Visual Studio 2008 JavaScript behaving different than live site - onload-event

I have several iis applications with a window.onload() defined which work properly when running directly from the web server. When I try to debug the same project on new machine with IE 10, it is behaving completely differently. Is there a configuration change that needs to be made within VS 2008.
Here is what I see.
When function window.onlad(){//code//} is defined. it does not fire in design mode.
When the function is defined as: function windowOnLoad(){//code//}, it needs to be called from a different line.
When the function fires as defined in the previous point, it runs before the rest of the body tag has rendered and therefore any calls to get form controls objects fails because it's not there yet.
I am surprised at this behavior because it is unique to running in the development environment alone. The live application works fine as defined in point number 1.
What is it that I am doing wrong?
Please help

Related

module.function is not a function after moving to server

I moved a small application to my server. I was running locally on my macbook pro and everything was working perfectly. When moving to a server it is saying a function in one of my exports is not a function.
I can provide some code if necessary but are there any main things to check?
Changing file names, printing out what is in the variable

Blueprism Application Modeller showing Launch instead of Identify when spying

I am using BluePrism v6.1.0 and I am trying to identify elements from a launched application in Application Modeller. (I used the Windows application type in the modeler configuration)
From some tutorials I saw, the launch button changes to Identify button after the app is launched, however, mine is still showing "Launch". Please see screenshot below
screenshot
You need to launch the application from the application modeller, not on your own.
Since you are using Windows 10, the built in applications are use differently than normal in windows 7. Here is how you can add the code to make it work with your system Screenshot. Also for future applications use this code in Windows Power Shell to get information about the application you wanted to work with in Window 10 : "Get-AppxPackage"
Not fully explained here but this can also mean not only is the app not launched but blueprism can't "see" the app is launched. Two ways to solve this so close the application and relaunch it then it will change to identify, OR you can attach the current instance of the object to the running application.
Either way the outcome is you're making blueprism see the active application so it will change the launch to an identify option.
Edit: watch out as well, if you connect your application to blue prism and then detach it blue prism will no longer see the running application hence will revert the identify option into a launch option.

Visual Studio 2015 / MVC 5: Attach to Process: Cannot obtain value of the local variable

I can connect to the w3p process on my IIS box just fine. I can step through, although it seems to skip some areas. Also, when I try to view a variable value, I get:
Cannot obtain value of the local variable or argument because it is not available at this instruction pointer, possibly because it has been optimized away.
I've seen MANY answer on this subject, but they all are geared toward local debugging. I am attaching to the server and getting this.
I have the source code and am working from that project. Does it matter if I publish the app to the server with the config set to 'Release'?
ANSWER: I switched it to 'debug' when publishing and now I can see the variables. I previously thought it was how it was set in the project properties, but it's how it's published to the server that makes the difference when publishing.

Rewriting IL using custom .net profiler in Microsoft SharePoint 2013 (IIS Server)

I'm writing a custom .net profiler to rewrite some methods in SharePoint 2013 on the fly.
The Class I'm interested is Microsoft.SharePoint.Utilities.DateOptions.
I've implemented ICorProfilerCallback::JITCompilationStarted and ICorProfilerCallback::JITCachedFunctionSearchStarted in my profiler and am currently just logging all functions being compiled. Also, I've set eventFlags as follows
DWORD eventMask =
COR_PRF_DISABLE_ALL_NGEN_IMAGES |
COR_PRF_DISABLE_INLINING |
COR_PRF_MONITOR_JIT_COMPILATION |
COR_PRF_MONITOR_CACHE_SEARCHES;
The problem is, No matter what I do, no method of DateOptions class will be compiled. I am sure that it should be called, and I've already tested my changes by disassembling, updating code, and reassembling it's DLL. I can see other classes in the same namespace loading and compiling (and can successfully rewrite them) but not this one. The decision to use a profiler for the job is a business decision and can not be reverted.
One point of interest is that this class is used on the code generating the page and its web parts, and I can see no other related classes in this code-path too.
I've enabled my profiler system-wide using system environment variables, and have tried rebooting so it will profile everything from startup to no avail.
Am I missing something here?
Edit: I guess it should be some setting inside IIS or something. I can see all normal classes and namespaces, but nothing that runs while rendering the page in IIS.
I finally solved my problem. It was kind of a dumb mistake I guess, but still I'm putting it here so no one else gets stuck like me!
I was using a specific folder on my C drive for development, and ASP.Net user account did not have read privileges to that folder, and could not load the profiler.
Parts of the process was run using a privileged account so I was able to log and rewrite it's functions, but the web rendering parts were under a limited account.
Copying the dll to System32 folder fixed all my problems.

VS 2012 Breakpoint Issues

I have run into an issue with VS 2012 not hitting breakpoints during the seeding process of my DB. I am on Svr 2008 R2 using EF 5. This is similar to this breakpoint issue, but not quite the same. Once I get past the seeding process my breakpoints work fine in the controllers (and I assume everywhere else).
I can get the breakpoints to work with IIS Express, but not IIS 7. Since the breakpoints that I would like to hit are in the Application_Start and the Seed process I do not have time to Ctrl-Alt-P to attach a process and attempt debugging that way. I did check windows authentication and registration of iis, those did not affect the breakpoints.
I can verify that the seeding is run with logging and how the DB is created. I would prefer not to revert to the dark ages of debugging with logs though. I would also prefer not to be required to switch back and forth between IIS Express and IIS 7.
To recreate this I started a new VS 2012 proj selected MVC4 and Internet Application. I manually changed the web.config to point to SQLEXPRESS. Then I changed the project properties > web to not use IIS Express. I created a breakpoint in the Application_Start and and a breakpoint in the homecontroller/index and ran the project. The only breakpoint that was hit was the index breakpoint. Rechecking the IIS Express allows both breakpoints to be hit.
Please let me know if you have seen this issue and have a workaround.
Thanks,
TJ
I seem to be running into lots of these types of issues lately. I clear ways to replicate them, and I leave them alone for a few days and they disappear. I am unable to recreate this anymore. I even used the same project that I was only changing the checkbox to use IIS Express.
So, when in doubt, don't pull out your hair, work on something else and be patient. Who knows, perhaps turning it off and on again worked (even though I did try that, thanks Roy).

Resources