« first day (2200 days earlier)      last day (2747 days later) » 
00:00 - 14:0014:00 - 22:00

12:52 AM
@KevinMaxwell you have a backup of it should import.
@hsimah are you recycling the pool in code?
 
yeah
I found there is a setting on the ProcessModel
ShutdownTimeLimit
what I was doing was waiting for the app pool state to change to started, but if something went awry it ended up in an infinite loop
 
did you use thread.sleep to wait?
 
I did
I am now sleeping for this timeout (as it is a setting on the app pool itself) * 2. If it isn't back on by then, throw an exception to the user and allow them to decide what to do next
this is in a powershell cmdlet
 
does the pool ever come back up?
 
it does, but I was using my cmdlet to restart an app pool and something went wrong and it never did come back. so my cmdlet just sat there sleeping until I logged onto the server and started the app pool myself
 
1:03 AM
and started it in the IIS manager?
 
yeah
 
1:16 AM
you have a cmlt to share?
 
@juanvan so, there is no limitation for using a newer version of SQL?
 
err pending... some older SQL servers let you use Special field types
 
I haven't used any special field types like Datetime2 and etc.
 
ya then it should, try a VM with SQL 2016 do a test before putting it into production
 
@juanvan sounds good
I've got another question, I'm at stage of publishing my MVC application. How can I publish my entity framework db/tables?
 
1:20 AM
you want the structure or the data too?
 
first time both but later when I make changes in the structure then just the structure would be enough.
I have many lookup tables for the dropdowns so I need to import them too.
 
ya would be best to make a solid backup of the DB then import it into the production
 
so you mean, attach my existing database into the production SQL Server?
so it's kind of manual way
what about the next times when I just want to update the structure?
 
this code first?
 
1:28 AM
38
Q: Is it OK to update a production database with EF migrations?

Adrian GrigoreAccording to this blog post most companies using EF Migrations are supposedly not updating the database schema of production databases with EF migrations. Instead the blog post's author recommends to use Schema update scripts as part of the deployment process. I've used Schema update scripts fo...

 
@juanvan mine has work-specific tools, but you can use the WebAdministration module in powershell (from microsoft) and restart-webapppool to restart app pools yourself
 
@hsimah does the cmlt command to restart work on it's own with out the rest of the tooling?
 
@juanvan I'm not going to use migration directly on the production server, I would use on my local and then publish each time I need to make some new changes.
 
ya that is how they answer?
 
@juanvan I don't know what you mean. my cmdlet or the webadmin one?
 
1:32 AM
the webadmin command
 
@juanvan some say use directly some say no.
 
@KevinMaxwell usually I work in production :)
but these are on unused webapps right now
 
@juanvan ok, that's why.
Mine is now unused, but in a few weeks it will be used and ripped off :D
 
coping is the biggest flattery
cpratt.co/… @KevinMaxwell
 
There is this option in VS 2015 called Package/Publish SQL, is this something that I'm looking for?
 
1:35 AM
have never used, would have to read the docs
 
@juanvan you'll need to import the webadmin module. powershell does it by default if it is installed when you run the command (so you dont need to import-module)
 
@hsimah but does it work in your case on it's own?
 
@juanvan Thanks for your help.
 
shhh with the pinging :) wife is sleeping
 
1:38 AM
@juanvan yeah I think it handles the app pool not coming back up - probably an error output
 
:), Do you remember the user CodeMaster?
 
I'm writing a cmdlet in c# - first to learn how to do it; second to have intellisense for our environments
 
@KevinMaxwell Ya with his project, you change your name?
 
my team refuse to learn powershell, so getting them to start remote sessions and execute commands is a bridge too far. so I wrote a cmdlet that takes a -ComputerName parameter and will connect and perform the IIS functions as needed
 
yes that's me. one day I logged in to my SO then saw that my account had a new name :)
I kinda liked it :)
 
1:40 AM
Ya had that icon with the glasses last I remember
 
yes
That project is done, I will need to publish it.
 
:) - Ohhh Sweet
 
I will travel to Uganda in mid November to present it there.
Throughout this project I learned a lot. I went through lot of difficult times but at the end it was successful.
I also remember you had a new born baby, I hope all family members are good and health ;)
 
Ya he is 7 months now - well tomorrow
 
yea, I remember now. Imagine this project took so long that people got married, kids and etc. :D
 
1:43 AM
3/24
that is great you got the app done, is it all tested too?
Ha well time moves forward
if one thing is constant its time
 
I tested all the sections while I was working on it. I also spent 3 weeks on just testing.
 
ya that is what ya want to do
brb have to god close up my car before it rains
 
In about 10 days I need to allow the HQ staff to test and then we will release the full version for Uganda office.
ok
 
it will feel good to get paid right!
 
you're right
 
1:53 AM
I did like your icon tho :(
 
the glasses?
 
ya
 
I will change it again
 
easier to ID too
 
yup
you know the question I asked about the database and etc. the migration take cares of everything but when it comes to production I have questions about it.
That's why I asked it.
 
1:55 AM
ya you are going to update it, and then have to update production
it's not a one and done
 
I know
So, I can still do the same way on my local machine, but I also need to get a script to update the production db, right?
 
it's worse then a kid, ya have to support it for the rest of your life
 
oh I know :(
 
ya you want to get that update-script
 
that's the one.
The VS 2015 feature that I told you does the same thing, it asks whether you want the scheme or data or both
I need to test it.
I actually should tell whether it's VS 2015 feature or an earlier version.
 
1:58 AM
ya I have never had that problem - Yet
all my projects are self serving
 
oh, hows' that?
self serving?
 
well they are mine so if I break them I bang the desk and fix it
 
ahaa :D
 
poor choice of words
 
Thanks for your help.
I should sleep now
Bye
 
2:03 AM
Night
 
 
3 hours later…
5:15 AM
anyone want to talk about interception in c#
no? okay. I don't either.
 
 
1 hour later…
6:28 AM
morning
 
7:16 AM
Morn all
 
good morning
 
7:40 AM
Gooood mornin' dudes
Time is not constant, it's relative to how fast you are moving
#nerd
 
no, its constant
 
In the theory of relativity, time dilation is a difference of elapsed time between two events as measured by observers either moving relative to each other or differently situated from a gravitational mass or masses. A clock at rest with respect to one observer may be measured to tick at a different rate when compared to a second observer's clock. This effect arises neither from technical aspects of the clocks nor from the propagation time of signals, but from the nature of spacetime. == Overview == Clocks on the Space Shuttle run slightly slower than reference clocks on Earth, while clocks on...
 
We are human time passage is stress related
sometimes
 
yeah right
that is theoretical physics only
 
Time is not constant. Hence the daily need to alter the clock of satellites.
 
7:47 AM
poetry bullshit regaring your life cycle
 
Since the gravitational pull is different, time is different. It's a matter of nanoseconds.
 
Yeah like a monday morning goes real slow...eh!!
 
true, but it has no effect on your daily life ^^
i know
 
Sure, but, time is not constant.
 
7:49 AM
@Proxy nope not theoretical physics sorry
 
i just don't like the poetry quotes
 
It's not poetry. It's cold hard science fact.
 
@RoelvanUden Good Mornin' Sensai!
 
i know
but for your life or mine it does not matter
 
7:50 AM
Just because you don't give a shit, doesn't mean nobody does.
 
i do
as i said
 
Time is not constant.
QED
Just like the sun is not yellow
 
@Nerdintraining Seriously..its monday come on
 
Thats why i talk about this crud :D
 
My mum told me the suns yellow are you saying shes wrong?
 
7:58 AM
eh, delegates and commands are a bit hard to get in real examples :(
 
y i have read it, its easy to understand but to use it in a real application i still need a bit time to get a hang of it
 
yeah I hear you, dependancy injection is like that
takes awhile
used that in a project and jeez still not sure about it
 
yeah guess practice makes the expert :/... at least i hope so :D
 
8:37 AM
@RoelvanUden snepai, have you watched revolutionary girl utena?
 
Morning
green tea wins...
 
@Proxy I haven't :-( It's still on my to-do list because yuri.
 
eh i heard its a good anime but i need confirmation from a valid source as well
 
@Mathematics Morn
 
@Ggalla1779 Yes, yes she is
 
8:43 AM
jeez you took long enough
 
@Proxy It's often praised as being one of the earlier series where the main heroine isn't a weak girl that needs protection from a man. And it's yuri. I still need to watch it, or read it, so no confirmation from here yet.
 
il most likely give it a go too
 
i like the art style as well and there is this
 
@Nerdintraining Your very literal Nerd...... The mum crack was a joke
 
8:46 AM
I want to switch to a teacher
Teach programming & that
taking requests now...
 
@Ggalla1779 i thought it was over exageration :D
 
@Proxy It's a typical shoujo style of the late 90's :P
 
@RoelvanUden yeah, i i could learn any "useless" thing in my life i would chose the ability to laugh like that
ohohohohohoohohohohohho
 
@Proxy Start practicing. :P
 
eh my voice is retarded in itself, i doubt it would work. Besides, first i would need to find a isolated room to start practicing, my roommate will kick me out :D
 
8:53 AM
Since HttpContext.Request.Cookies["LoginCookie"].ToString() isn't giving me the value of the LoginCookie, and I can't get the much suggested HttpContext.Request.Cookies["LoginCookie"].Value to work, does anyone know how to do it?
 
Hey people
 
9:20 AM
@Xariez Does that cookie even exist on the client side?
 
9:30 AM
It should. Nontheless though, disregard my last issue. Got it fixed or atleast it seems like I did.
 
9:44 AM
is there anything in azure a dev should learn about
 
azure
 
did I spelled it wrong ?
 
10:06 AM
Hi Bechi...welcome
 
@Mathematics depends what you want to do. Azure is an umbrella brand for >50? different services.
 
10:22 AM
I did a pluralsight course... code first, bootstrap then at end you deploy to Azure/ SQL Server
very very nice
 
@Mathematics same with math, many areas to learn
 
@Squiggle Name one on Azure
what I want to know is that, is it really that much one needs to learn
or is it just like click and done
 
there are azure services and API's
so click and done concept is just a fantasy
 
so it is really a beast then
 
Anyone here used npm/bower/gulp or grunt in an asp.net 4.5.x project successfully?
 
10:30 AM
@Euphoria we have same profile name, i used that too before :3
 
@Euphoria Yes
 
@RoelvanUden what is the main purpose of gulp?
 
@Roel van Uden - I'm struggling to auto-include the files that are downloaded and then copied/minified by gulp in the project.
I mean, I've been banging my head against trying to get them to auto include with custom build targets (to no avail) I'm losing sight of what I was trying to do
In the 4.5.2 project do you use the files with BundleConfig?
or do you include them using <link tags in a view somewhere?
 
in my experience i think bundle and gulp cannot go together
maybe im wrong
 
well, even if I don't use bundleconfig and include them straight in the views (the files generated from bower/gulp process) it won't work because they are NOT included in the project
perhaps I'm looking at this wrong? I've had no real answers to 2 questions I've asked in regards to issues I'm having with this. E.g. stackoverflow.com/questions/40186163/…
 
10:36 AM
offer a bountry
and i will answer that for you
LOL
joke only
 
You should give me a bounty for asking such a good question!
:p
 
10:59 AM
@RoelvanUden Is this project on github or anything like that? (it's not public is it?)
 
how to make one click audio converter >
 
Anyone ever seen a beautiful code solution ?
 
what
 
@MidTwo Gulp is a task runner. It runs tasks. That's all it does.
@Euphoria Why do you want to include them? For versioning/publishing?
@Euphoria Do note that you should not be using bower. It's terrible.
Even the authors of bower admit it's not very good.
@Euphoria No, I haven't added it to GH. All you need to think about is your workflow.
 
11:15 AM
@Proxy like you look at a structure of project e.g. layering etc.. and go WOWsss
 
@Mathematics Sure.
 
Really ? where was that
is it open source
 
Well the flow I was thinking about was this.
- Use npm/bower to get the packages
- Use gulp to extract the required files from these packages (main bower files etc.) and place them in a folder such as Scripts/lib
- Include them in BundleConfig.cs as usual

Where I'm struggling is, when I use gulp to copy files to the Scripts/lib they are not included in the project. I have to go and manually do so. This means if I want to use npm etc. I'm going to just have to use npm to get the distributions then and just copy them over manually and include them and not use gulp to do any tasks etc.
 
Not enough layering :p
Also if you're wondering why on earth I want to stick with BundleConfig is because I do some custom logic to include some style sheets that are linked to values from a database.
 
11:23 AM
Okay.
1. Forget about `bower`. Use `npm` exclusively. All your modules should have a `dist` folder where the distribution file for inclusion are located. React, for example, lives under 'react/dist/react.min.js'.
2. Forget about `gulp` and `grunt`. These full blown task runners can be effective for complex matter, but they don't add too much value for this simple workflow. Use something simple to do copies, instead. Built-in windows commands would work (e.g. xcopy). For cross-platform, look at my https://www.npmjs.com/package/npm-build-tools.
 
what does manga means
in our language it means beggar lol
 
@Mathematics - oh wow, you didn't just ask that :p
 
@Mathematics Japanese comic books
 
@Mathematics - manga is, well manga - google :)
 
@RoelvanUden are you really from Japan, I heard it's okay to sleep on a desk in japan as that means people work really hard
 
11:25 AM
@Mathematics I'm not from Japan. I just love their cartoons and comic books.
 
not even near japan ? like Korean, Chinese etc ? :(
 
If you haven't seen dbz, you haven't lived :p
 
I'm from the Netherlands, so I'm quite literally on the opposite end of the world.
 
for all these years I thought you were from japan - complete fail !
 
Meh, Dragonball is just your generic shounen action series with no real story.
I may behave like I am! :P
 
11:27 AM
@RoelvanUden - Just processed what you've written. Will BundleConfig.cs be able to pick these files up though if I don't "Include in project"?
Obviously, npm knows nothing about .csproj etc. So it isn't able to do that for me.
 
@Euphoria Yeah, but they won't be versioned or published, so depending on your strategy there, you may want to make sure the output file is also published.
 
Well by the time bundleconfig has picked them up and made them available to the project. Does it matter if they are not published?
and since they are 3rd party and re-retrievable - they probably don't need to be versioned etc. As a rule that I follow is to never edit 3rd party libs directly so that the next developer doesn't come and lose all those changes if updating etc.
 
BundleConfig is runtime trickery. It doesn't even know about your project files, much less manipulate them. All it really does it add a route which, when hit, serves content from memory that happens to be a concatation of files on disk. These files are read from file system, and then cached in memory for performance reasons. Thus, BundleConfig only understands 'these files exist on disk', and nothing more.
So yes, it matters a great deal if a file it expects to bundle is not published, because it does so at runtime. And would fail in production.
 
Well this is the part I'm having my difficulties with :)
I've learnt and experimented all the concat/copy/scss compile trickery npm/gulp etc. have to offer
but I wasn't able to get these files auto-included in the project
:SAD_FACE
 
Well, just right-click 'Add existing file' on the bundle from npm
If it generates something new, TFS should show you it changed.
If you use TFS.. I assumed.
 
11:37 AM
Well, we use svn but yeah same principle. Fair enough.
and obviously this will only need to be done on newer added files.
 
Depends on the way you do your workflow. If you make npm tasks responsible for bundling up dependencies, you'll always have one dependency file.. and no more, so you dont ever need to add new deps into your proj
 
To be fair, if another developer goes ahead and adds a new npm package, then it's kinda his/her responsibility to ensure it is included in the project once the npm copy task has moved it to the output folder.
Alright thanks for talking through this with me, I'm going to go ahead and delete my questions because I guess what I was trying to achieve there isn't the typical way of doing things, especially in a .net 4.5.2 project.
I'm assuming (not tested it yet) asp.net 5 doesn't have these issues and works differently.
 
@Euphoria But if you concat in npm... ;-)
For example n-concat node_modules/react/dist/react.min.js node_modules/react-dom/dist/react-dom.min.js | n-pipe Scripts/dependencies.min.js would be combining two dependencies into the same file.
Then you just include dependencies.min.js.
 
I will do both non-concat files (for debug purposes) and a single concat for Release
 
Are you going to debug your dependencies?
 
11:44 AM
and then in a .cshtml using bundle config, do an if statement (Http.....DebuggingIsEnabled) { include all the things } else { include min.js }
Well, it's a possibility and I've found that sometimes if you include the files in the wrong order etc. If they are debuggable then you can fix them issues easily. That and my manager requires them to be debuggable :)
 
Right. Concat files can also be served using sourcemaps
 
When you say sourcemaps do you mean something like this: github.com/benmccallum/AspNetBundling ??
Is it just bundleconfig doing the concat work? therefore not having to use npm to do it?
 
12:12 PM
If I'm doing schema compares between databases in VS. I noticed that it sometimes does some DML instead of just DDL, does this make sense? Should schema compares really be doing manipulation?
because our prior DBA had the devs put into the DDL_Admin role in SqlServer, so when the schema compare tries to do any DML it fails..
 
12:27 PM
Hello Puppies
 
hi :)
 
@JakobMillah wags tail
 
Job secured in my town. A bit thanks to you guys tbh :P
@RoelvanUden Remember when I brought up the discussion where my previous job were going to decide whether or not they were going to start working with angular 2.0 etc? And you recommended react. I brought that card up during last interview. That gave me a lot of plus and probably a bit better salary
The card that Angular is falling behind and that react is the way to go
 
congratulations
 
Hah! Nice one. Congratulations, and good application of things you heard :3
 
12:35 PM
so you will be using this chat again :P
 
@Proxy Thanks! :)

Most likely yes. If I decide to take the job ^^
 
:)
 
I am just waiting for that other company to see what they offer
 
Is it normal to have an abstraction layer (PersistenceService) between the repository and the actual "persistence-implementation" (Like DatabasePersistenceService is an implementation of IPersistenceService), or dont you give a shit on it? I mean, so you are flexible with your persistence, be it first a database, then u could change it easily to e.g. json
 
Elaborate. Repository, actual persistence, persistence service?
 
12:43 PM
sorry, so my repository would use an implementation of the Interface "PersistenceService" , and such implementation wud be a so called DatabasePersistenceService which offers CRUD-Operations directly using sqlconnection/datarow etc.... The repository wud have an instance of this persistenceservice and use it's CRUD methods for it's own methods. So that I could passs a JsonFilePersistenceService and theoritically change the persistence method with little effort/changed
our wud you say "never happened" (Im not experienced and not professional but wanna do it "professional")
 
Oh. I have yet to see the day where an application needs to swap out a database for an alternative storage method, while keeping the other method intact. I don't think this adds any value. It only makes it all more complex. Repositories containing the SQL statements would be fine.
 
k, thx! thought that, too (but dont have the experience to answer this myself)
 
That said, I think it is more common to make multiple repositories rather than have a repository talk to yet-another-class. For example, IUserRepository interface with SqlUserRepository and JsonUserRepository classes.
 
War
ok guys what am I doing wrong here ...
if (!typeof(ICollection<>).IsAssignableFrom(typeof(T)))
{
     /// do some stuff
}
T in this case is ICollection<someType> and it's going in to the if
surely that shouldn't happen
 
12:59 PM
Do you not need "Type" in the <> of ICollection?
 
War
typeof(ICollection<>).IsAssignableFrom(typeof(ICollection<object>)) == false
wtf
not what Iwould expect
or is my head round the wrong way again
@Euphoria no ... i'm checking if the given type is a collection basically
i don't care what its a collection of ... only that it either is or isn't a collection
 
I understand - wish I could help, I'm fairly amateur at my generics
 
War
typeof(ICollection<>).IsAssignableFrom(typeof(ICollection<object>)) == false <-- i would expect this to return true
now i'm confused
typeof(ICollection<>).IsAssignableFrom(typeof(List<object>)) == false <-- weird
 
17
Q: How to determine if a type is a type of collection?

Byron SommardahlI am trying to determine if a runtime type is some sort of collection type. What I have below works, but it seems strange that I have to name the types that I believe to be collection types in an array like I have done. In the code below, the reason for the generic logic is because, in my app, I...

Does that help at all?
Assuming you haven't already seen that :p
 
War
hmmm ... interesting ... the answer is actually wrong there
sure I hit some weirdness with strings and IEnumerable
interesting ... the comments even say that it didn't work lol
and the string thing :)
 
1:08 PM
Hmm, strange that it worked for the OP :E
+32 Voters
 
War
well ok then
run code ... breakpoint on line in question
put this in watch window:
typeof(T).GetInterface("ICollection") != null
returns false
T is :
System.Collections.Generic.ICollection`1[[Core.CLeX.Objects.Dtos.SIHeadByRef, Core.CLeX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
that answer is clearly wrong
so 32 people can't use a watch window
or this only works with some types ... like where the type in question directly inherits the interface or something
ICollection and ICollection<T> are different interfaces I would guess
maybe that's the issue
@RoelvanUden I have code like that, depending on the business action being performed I either dump to a raven context or a EF one
that said ... I use interfaces so the code above doesn't care, it simply expects an IDataContext
wow this is weird ...
var colType = typeof(ICollection<>).MakeGenericType(typeof(T).GenericTypeArguments);
typeof(ICollection<>).IsAssignableFrom(colType) == false
eh ??? how!
 
1:30 PM
It's got to be something very niggly
 
War
this is interesting ...
typeof(ICollection<>).IsAssignableFrom(typeof(T))
typeof(T).IsAssignableFrom(typeof(ICollection<>))
both return false
so it's not that I got my params round the wrong way
seems like an obvious mistake to make
typeof(T) == typeof(ICollection<>).MakeGenericType(typeof(T).GenericTypeArguments) == true
ok that makes sense at least
typeof(T).IsAssignableFrom(typeof(IEnumerable<>)) == false
weird
ah that should be round the other way
 
@War Yeah, but we've already established you do some weird things.
 
War
typeof(IEnumerable<>).IsAssignableFrom(typeof(T)) == false
that's weird
 
Is javascript hard to learn?
this would be with EF and MVC
 
War
@Ggalla1779 no
@Ggalla1779 you can use EF and javascript together?
 
1:40 PM
anyone point me at a good lesson
 
War
when did that happen?
 
cant I?
No idea I met a client who wants ne to work for himm
 
Not together you can't
He's probably thinking EF -> web api -> javascript
 
War
that you can do
 
Maybe hes moving from JS to EF and MVC
 
War
1:41 PM
eh ???
and I do weird things!
 
I know
Am not webby at all
they have old apps
who knows prob classic asp
 
Hi guys
 
@Ggalla1779 JavaScript is easy to learn, yet hard to master. You can combine it with any server end-point, and yes, MVC+EF can serve as a really nice end-point. If he is moving "From JS to EF and MVC" then no, you cannot do the same things with MVC traditional web sites as you can with a JS SPA.
 
guys is it possible o do something like this:Like i have 1 web application and i have some external database on mssql and i would like to allow user to connect to that external database just like we do import from excel or from database to sql server
From there we have options like import from excel etc..
any idea or help please
 
War
@Learning OData
never give any client direct access to your DB
 
1:53 PM
No its not my DB
Its client db only on which client would like to connect and dump his db in to my server
 
Clients never connect to databases.
You can make a function that allows your client to instruct your server to connect and import from an external db.
 
00:00 - 14:0014:00 - 22:00

« first day (2200 days earlier)      last day (2747 days later) »