« first day (2175 days earlier)      last day (2766 days later) » 

12:18 AM
good morning
does anyone have a quick second to reproduce an error with ServerManager and applicationHost.config in IIS 8?
it's happening with all my servers and I assume it's an issue in the framework but I want to be sure
 
1:09 AM
@hsimah what is the error you are getting?
 
when I use ServerManager('\path\to\applicationHost.config') with an IIS 8 configuration file, I get validation errors for elements/values added since IIS 7
for example, if I have configured CPU throttling on the application pool I get this:
Error: The 'action' attribute is invalid. Enum must be one of NoAction, KillW3wp
those were the only two options in IIS 7, but in 8 I can use Throttle and one other
if I change my CPU setting on the app pool in IIS to NoAction/KillW3wp I do not get the validation error
 
there is no way to set these up in the IIS manager, did that change from 7 to 8 as well?
 
you can change it under Advanced Settings for the application pool
in IIS Manager
 
then you should be able to set it in the web.config
 
1:25 AM
uh, that's not my issue
my issue is when I want to use ServerManager to manage my IIS site I get a COMException when accessing the ApplicationPools property. It looks like the validator is out of date and does not know about the new enum values.
the site runs fine, the throttling works fine too
it only doesn't work when I use ServerManager ctor that takes the applicationHost.config file
I would like to know if someone else can reproduce it
 
they would need an install of IIS or the express could be set to do it?
 
I dont know about express, I have only seen it in IIS8 on a Windows 2012 R2 server (all seven of my production servers are the same)
on Windows 7 I only have IIS 7.5, which only has NoAction or KillW3wp, so the validation works locally
 
Where is the setting? under the appool?
 
yeah IIS -> Application Pools -> select your pool, click Advanced Settings
then scroll down to CPU
it's the Limit Action setting
 
NoAction KillW3p Throttle ThrottleUnderLoad
Microsoft-IIS/8.5
 
1:41 AM
yeah, if you set it to Throttle, then in a C# application instantiate ServerManager with the path to your applicationHost.config (C:\windows\system32\inetsrv\config\applicationHost.config)
then try and read the ApplicationPools property you should get an exception
 
going to take a sec to get the sample up and tested
 
you'll need to use Microsoft.Web.Administration;
thanks for giving it a go
 
making a stock mvc with Identity - guess the Microsoft type?
 
I just used a console application for testing. I am using this code in a powershell cmdlet
 
ohh just ref that lib ok
 
1:45 AM
yeah
 
so the console app runs on the server
no errors it launches and executes then closes
 
this is the code I execute
is yours the same?
 
2:02 AM
updated it to that and it worked
 
okay
it must be something else
thank you very much
 
i had this before
  ServerManager serverManager = new ServerManager("C:\\windows\\system32\\inetsrv\\config\\applicationHost.config");
            serverManager.CommitChanges();
 
hmm
I think it has something to do with using impersonation
I deployed my console exe to the server and ran it and it worked fine
when I run it as a different user it crashes
 
ahh
not as an admin, if you run it as IIS_IUSER it crashes?
 
I'm running it as an administrator of the server, but no not as IIS_IUSER
I'll have to investigate this further. It seems if I run it from Windows 7 it crashes, but running it on a Windows 2012 server it does not
it only seems to happen when you impersonate a user (ie runas) to impersonate an administrator of the remote computer from a Windows 7 machine
doing the same on Windows 2012 R2 doesn't throw the exception
gotta love these sorts of things
 
 
3 hours later…
5:30 AM
lol I hate it when you're learning a new framework and spend ages writing stuff and then come across a feature that would've saved you ages
 
 
1 hour later…
6:37 AM
@hsimah Nah, it's great. It really makes you appreciate the framework, and understand why the features are there.
 
6:50 AM
Hi
I am getting this error
Active Server Pages error 'ASP 0115'

Unexpected error

/data/2/famverify.asp

A trappable error (C0000005) occurred in an external object. The script cannot continue running.
How can I solve this error ?
 
@SagorAhmed You have to start instrumenting your code better. You have to know exactly what line of code throws the exception, not which page.
 
Probably , the error shows for dll file code
But how can I detect it ?
 
If you can't debug your ASP server, try adding debug printouts in your code before/after operations, to narrow down the call that throws the error.
 
7:14 AM
or, y'know, stop using Classic ASP.
I'm not going to stop saying that
 
Yeah. Go to your bosses and say "Using 20 year old technology is costing us time and money. Every time I spend hours debugging a piece of ASP code, it costs us time and money"
If it was something that simply works, I'd say "fine, keep it in ASP, no need to rewrite".
But if you're still actively fixing and developing it, you're costing yourself time and money trying to do it with 20 year old, unsupported code.
 
event viewer does display asp errors
 
Finding people to help you with it is harder, and there's something to be said for the emotional cost of having people on chat laugh at your code all the time.
 
technological debt is using old technology?
hm
 
Not necessarily, but it is a form of technological debt.
 
7:18 AM
I just want to find a term to describe it
 
How about the a-technical description: 'that piece of shit'
 
oh @Roel my typings problem is gone because ionic stopped using typings yesterday and switched to npm @types :^)
:^)^)^)^)^:)^)^:)
 
wonderful.
 
completly
 
7:35 AM
Morn all
 
good morning
 
Good morning everybody
 
wew
 
7:53 AM
\o
 
@AvnerShahar-Kashtan he's been asking here for help on the same piece of ASP code for perhaps 3 weeks already, just FYI
 
@Squiggle I know.
 
!!wat
 
Are algorithms an important aspect in programming is it worth looking into for a software engineer . I understand that everything inside a function is an algorithm not sure if that's right but also would studying these algorithms such as sorting or searching and above and beyond that help in improving my programming knowledge ???
 
8:10 AM
well. You might work for some scientific company, which tries to improve on algorithms, than You are advised to know theese things. Unless I suggest to know the tools.
 
I'm not sure what you mean by unless I suggest you know the tools. Is that implying to learn them any way or just leave it alone and continue on projects and writing code since I'm self taught I really never dived into algorithms that much @ntohl
 
basic algorithms You have to know. I meant You know the tool to use it, not to implement it. For example sorting. There are a ton of sorting algorithms. If You know that most of the time quicksort is used, than You know a tool for sorting. I wouldn't go much further in every day practise, how is it implemented.
 
algorithm
ˈalÉ¡É™rɪð(É™)m/
noun
a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
^ basically a computer program
So yeah, you're meant to know how to write software if you want to be a programmer.
 
Dictionary definitions aside, when people say "algorithms" they mean the sort of classic algorithms learned in CS Algorithm classes. Quicksort and Heap searches and breadth-first tree scanning and so on.
 
Well can you use something something.Sort() to sort through a list. Why re invent the wheel right . yes I understand that programming is algorithms and data structure , basically data structure + algorithms = program
 
8:20 AM
hello
 
And generally speaking, you can write complicated, well performing software without knowing how these things are implemented. They're a lower level of abstraction that today's frameworks can do for you very nicely.
 
i have an issue placing breakpoints in my code
 
@AvnerShahar-Kashtan yeah, I was being a pedant :P
 
im building in release mode x86 .. I have optimizations disabled
but usafe code on
 
But just like in most cases, knowing how things work under the hood can help you understand the ramifications of your work, even if you don't have to implement them yourself.
 
8:21 AM
@techno did you restart Visual Studio? :-]
 
You don't necessarily have to know everything down to the flip-flip and circuit-logic level, but knowing how things are implemented one or two abstraction levels down can help, even if only in general terms.
 
yeah
@Squiggle tried several times
 
Knowing the difference between O(1) and O(n^2) algorithms is important, even if you don't know the math behind a specific sort algorithm.
 
i get this message ..
 
I agree with @AvnerShahar-Kashtan I think using something.Sort() should handle all the sorting right ? If that's what you were implying but then there are many types of algorithms . other than just searching and sorting which I don't understand why they are so many
 
8:22 AM
@techno OK. Is it the old "no symbols loaded for this document" issue? are you setting breakpoints and just not seeing them hit?
 
Do I need to write all the properties explicitly when I am using AutoMapper, if these properties have the same name?
 
@june1992 Because they have different performance characteristics. There may be a good enough for 90% of general usage algorithm but in specific cases you might need something else.
 
@Squiggle im trying to set breakpoints in the release mode... but on running it
 
yeah, if you build in Release mode it doesn't output any debug information.
you can't.
 
8:23 AM
it says the breakpoint will not currently be hit no symbols have been loaded
when i place my cursor over there..
 
only if you build in debug will the symbols be built...
 
release mode doesn't create debug symbols
you can't
 
but in my workplace i remember being debugging with release mode
 
Not necessarily - you can generate PDBs even in release build.
 
symbols are the .pdb files that your debugger needs to tell what's going on in the compiled code
 
8:24 AM
by placing breakpoints on VS2010
 
@AvnerShahar-Kashtan yeah I was generalising.
 
It will still be limited compared to debugging in Debug mode, but you can get basic information.
 
im currentky using VS 2012
 
copy the pdb from the debug folder to the release folder
 
I have noted that users are getting out of memory expection
so im trying to point it out
but when i try to use the debug mode
this is what i get when trying to reproduce the issue
 
8:27 AM
@ntohl Better to generate PDBs specific for the release build, since they can be different from the debug builds.
Ah, out of memory exceptions are always hard to pinpoint.
 
^ definitely
 
i know nothing about pdbs
 
Better just get a memory dump of the app when it crashes and load it in WinDBG or something.
 
I caught the exception
 
The exception will tell you what trigged the OOM, not what is actually taking up your memory.
 
8:28 AM
using message box and tried error.stacktrace
 
> A program database (PDB) file holds debugging and project state information that allows incremental linking of a Debug configuration of your program.
 
You might be allocating a perfectly fine array, but somewhere else, a memory leak has fragmented your heap.
 
but could not point out the line which results in the error
this did not contain the line which caused the exception
 
@techno Go to your project's properties, Build -> Advanced button (bottom), and see the Output -> Debug Info options.
 
61
A: Should I compile release builds with debug info as "full" or "pdb-only"?

Matt DillardI would build with pdb-only. You will not be able to attach a debugger to the released product, but if you get a crash dump, you can use Visual Studio or WinDBG to examine the stack traces and memory dumps at the time of the crash. If you go with full rather than pdb-only, you'll get the same b...

some explanation there
 
8:29 AM
@AvnerShahar-Kashtan just a second
 
@techno Again, even if you add the PDBs and manage to get a specific stack trace showing where the exception occured, it won't necessarily be the cause of the OOM, just the trigger.
 
@AvnerShahar-Kashtan there is no advanced button in the build menu
@Squiggle let me see that question
 
it's pretty much what Avner said.
 
@techno Not the menu, the Build property-sheet inside the Project properties.
 
build, output the pdbs and see if you can get more meaningful crash information out of the release build
 
8:32 AM
I see it in VS2015, but I remember it being there from VS2003 at least.
 
@AvnerShahar-Kashtan its set to none
 
@techno Right. Set it to full (or pdfonly) and build. It will generate PDB files, which you can then load - in the debugger, open the Modules pane (Debug -> Windows -> Modules), find your assembly in the list and right-click -> Load Symbols.
 
okay
@AvnerShahar-Kashtan i was able to place breakpoint in release build
and was able to hit it...
will check from there
i will read upon PDBs
btw.. i have now set the debugging info to full ... will this make the code more unsafe in terms of obfuscation
i guess i will set it back to none while building the final release guess
 
@techno Set it to pdb-only and keep the PDBs at home.
You don't have to deploy them along with your app, but you can bring them with you as a production debugging toolkit.
 
okay
i hope setting to none will cover it
in terms of code safety
@AvnerShahar-Kashtan
 
8:39 AM
What the PDBs do is simply map between locations in the compiled DLL and file-and-line-numbers in the original code.
So if you simply don't ship your PDBs, there should be no obfuscation aspects to it. The DLLs themselves don't change, it's just the mapping that's generated.
 
i get that
anyways setting it to none will be okay i guess
i guess im setting whether the release should contain debug info with this option
not the debug-mode .. i guess
 
@AvnerShahar-Kashtan oh. Thanks
 
                Do I need to write all the properties explicitly when I am using AutoMapper, if these properties have the same name.

                For instance:CreateMap<CodeValues, Bar.OrderRequestValue>();

                Will return a null value when i debug with a unit test.
 
@AvnerShahar-Kashtan thanks
 
@Froxer test it
 
8:46 AM
I just did
It did return a null
 
a null object? or just null properties?
 
oh. I thought it's a question
 
I am asking if there is a way to map the object, instead of a field inside of the object and therefor needing to explicitly map every field value in every object
 
uhh yeah
mapper.CreateMap<Foo, Bar>();
 
yea, i did that
then i unit tested
(debug)
the value was null
 
8:48 AM
var booking = context.Bookings.Find(id);
if (booking == null) return NotFound();
return Ok(mapper.Map<BookingVM>(booking));
you can populate an existing object like that as well
var mapper = new MapperConfiguration(m =>
{
	m.CreateMap<Booking, BookingVM>();
});
with that mapping
what's your .Map<Foo>(...) code?
 
I am doing exactly

var mapper = new MapperConfiguration(m =>
{
m.CreateMap<Booking, BookingVM>();
});

already
 
that says "I can create a BookingVM directly from a Booking entity because the properties are the same"
 
Pro-tip: Ditch AutoMapper right now. A box of black magic never makes your code easier.
 
hey, it's fine for trivial small projects
 
and then i

var foo = mapper.Map<Object, Bar.Object>(object)
 
8:54 AM
but yeah, it can have some nasty side-effects by creating detached entities from view models
 
^ i check values on foo
and the .ForMember props have mapped fine, while object Foo.CreateMap has not.
 
@Froxer you don't need Bar.Object there. And can you use better names in your examples?
 
what names would you prefer?
 
you're saying "create me a foo of type Object from my existing object of type Bar.Object"
rather than "Create me a viewmodel of type MyVM from existing Entity of type MyEntity"
 
var foo = mapper.Map<SourceObject, DestinationObject>(variableHolding the instantiation of a class)
 
8:59 AM
why <SourceObject, DestinationObject>?
I just use var foo = mapper.Map<BookingVM>(booking)
 
Because that is how the logic looks like right now (idk if it is the right way)
 
because it knows the type of booking already
it's hardly rocket science
 
guess its not if u have done it more than once.
 
:P
what I'm saying is that you don't need <SourceObject, DestinationObject> - just <DestinationType>
 
Ok, so your source is in the braces ?
Or is that still your variable for your class ?
Or how do you even define the Source?
Because every Destination, has a different Source.
oh.
 
9:07 AM
...
you've already declared which types can be mapped to others
 
so my fuckup is when i do Foo.CreateMap<TSource, TDestination>();
 
Hello, fellow programmers!
I am curious, if there are some other ways to hightlight some comments in Visual Studio with different colours (other than //TODO or //Bug).
 
Ok ok ok
im retarded, of course
 
so you just say "Mapper! Please create me a new X from this instance of Y"
 
ye
 
9:08 AM
Looking for something like //info or //note
 
wew.
 
:-]
@Denver why would you need that?
//info or //note could just be /// <summary> comments </summary> instead, surely?
 
I am porting code to .Net Core and I want to highlight those parts of code that I will be changing.
And I want those to be highlighted differently for other members of my team.
 
Hi All
1
Q: Need to Bind values to dropdown dynamically with Jquery

Zed <tr> <td> <select class="form-control" id="QueryColumnList[1].Columns" required="" data-msg="Select the Column"> <option value="">Select a Column</option> </select> </td> <td> <select class="form-control" id="QueryColumnList[1].OperatorName" required="" data-msg...

Any help?
 
9:13 AM
Yay! Might help. :)
Thanks. :)
 
google ftw
:)
 
I googled but did not manage to find good words to describe to google what I want. xD
English knowledge ftw.
 
but wait..
 
Your leg! IT'S CAUGHT IN A BEAR TRAP
 
if i do var foo = Mapper.Map<MyObject>(myVariable);
LOL
I need to have it initialized first
and if so
it is static right ?
 
9:21 AM
need to have what initialized first?
 
Mapper
 
I use dependency injection for mine.
ASPNet Core has it built in, but Autofac is easy to implement if you need to.
 
1
Q: Need to Bind values to dropdown dynamically with Jquery

Zed <tr> <td> <select class="form-control" id="QueryColumnList[1].Columns" required="" data-msg="Select the Column"> <option value="">Select a Column</option> </select> </td> <td> <select class="form-control" id="QueryColumnList[1].OperatorName" required="" data-msg...

 
im getting InvalidOperationException: An exception of type 'System.InvalidOperationException' occurred in AutoMapper.dll but was not handled in user code

Additional information: Mapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource extension methods, make sure you pass in the appropriate IConfigurationProvider instance.
 
are you following any particular guide on using AutoMapper?
 
9:31 AM
I'm just sitting here, wondering, why you are wasting all that time with AutoMapper
 
it's a valid point :)
foo x = new X {
 a = y.a,
 b = y.b
};
// done
 
No @Squiggle
im not
 
@Froxer so you're just copy-pasting code and asking questions here until it works?
 
An exception of type 'System.InvalidOperationException' occurred in AutoMapper.dll but was not handled in user code

IS because I am trying to map nonstatic class with Mapper.Map<- Static
 
Learn for yourself
 
9:33 AM
so InvalidOperationException
 
stop that.
 
Where did i copy paste from ?
 
where did you get Automapper from?
 
Because, the code so far is Try & errored.
 
you must be reading some documentation
 
9:34 AM
I got automapper from a suggestion
Prior to this i was manually doing mappins
mappings *
without AutoMapper
then, there was just more and more objects
and i talked about it in a lunch break
 
and then you tried to use automapper
 
and someonne said try automapper
so i installed the nuget
 
and read the documentation...?
 
tried getting it working
No
 
READ THE DOCUMENTATION
 
9:36 AM
I litterary just man moded it
 
I am not a documentation
sweet jesus
 
Oh ok, i thought u were a PDF file im sorry
 
@Froxer Why are you listening to this someone when you clearly don't understand the set of advantages/disadvantages AutoMapper brings to the table?
 
Idk, i dont mind trying new things and tools.
I am open minded
 
that is a valid point.
 
9:37 AM
I guess that is why, my mistake is that i should prior diving into anything do a bit research.
 
You try new things and tools for a reason and after reading about their advantages.
If you don't think a tool will bring an advantage, don't bloody use it.
 
ok.
 
(* Disadvantages are usually not listed)
 
kk so config.CreateMapper(); is the nonstatic variant of Mapper.Map
 
@Froxer read the documentation
 
9:41 AM
fine
i will
 
:) thx
 
hello its been a while :P
 
wew
the documentation is all about static usage
im using nonstatic
 
9:59 AM
how are you using nonstatic?
using dependency injection? or via a (blergh) ServiceLocator?
 

« first day (2175 days earlier)      last day (2766 days later) »