Session not sticking for ASP.NET MVC2 in IIS7.5 in IE8 - asp.net-mvc-2

We have an ASP.NET MVC2 web application. For reasons outside the scope of this issue we decided to use the classic session state in the application. Following features are implemented in it related to session.
Session_Start event handler in global.asax stores a variable in session. This is in relation to a workaround to detect session expiration.
Session being used has the following values in web.config:
sessionState timeout="30" mode="InProc" cookieless="UseCookies"
Forms authentication is being used has the following values set in web.config:
forms loginUrl="~/Account.aspx/LogOn" timeout="1440" protection="All" slidingExpiration="false"
The web application was working in IIS6 without issues, until we deployed it onto IIS7.5. On IIS7.5 Everything apart from Session seems to be working. It seems the session either regenerates or loses values; in short it doesn’t stick, only happens in IE8; still works in Chrome and firefox.
Search on Google leads to a possible answers that; the global.asax doesn’t get fired in IIS7.5. Some guys got it working as a web application in IIS7.5; but we are running it as a site. Converting it to a web application doesn’t seem to solve the problem for us as we tried that too.
The configuration for our new server is Windows 2008 R2, IIS7.5, asp.net framework 2,3.5 and 4 are installed on the machine.
An interesting aspect of this is that the session seems to be working on google chrome and firefox browsers; which leads us to think that this may have something to do with the cookie generation on the client.
If someone has faced this issue and has a resolution we are all ears.
Thanks in advance for the help.

Related

What is this page unresponsive error in Blazor WASM?

I am developing an industry-level blazor application in .NET 6. currently, it is not a simple application, because It has several assemblies and each assembly has a considerable amount of razor files classes, interfaces, etc. I am using some heavy manipulation inside the applications for the data getting and sending requests. So my issue is, currently I am getting this page unresponsive error on chrome browser. I can't load the page.
I cleared the browser cache, tried on different browsers .but they didn't work.
Does anybody know what may be the reason for this ??

Is it possible to call one custom keyword function from another Custom keywords from katalon Automation Tool? [duplicate]

I am trying to create an ActiveXObject (to use FileSystemObject) but it's only supported in IE.
Is there a way I can make it work in Chrome or Firefox? I need to read all the files in a specific given folder, and list those.
Well, is there another way to do it?
ActiveX is only supported by IE - the other browsers use a plugin architecture called NPAPI. However, there's a cross-browser plugin framework called Firebreath that you might find useful.
No for the moment.
I doubt it will be possible for the future for ActiveX support will be discontinued in near future (as MS stated).
Look here about HTML Object tag, but not anything will be accepted. You should try.
ActiveX resolved in Chrome!
Hello all this is not the solution but the successful workaround and I have implemented as well.
This required some implementation on client machine as well that why is most suitable for intranet environment and not recommended for public sites. Even though one can implement it for public sites as well the only problem is end user has to download/implement solution.
Lets understand the key problem
Chrome cannot communicate with ActiceX
Solution: Since Chorme cannot communicate with ActiveX but still it can communicate with the API hosted on the client machine. So develop API using .Net MVC or any other technology so that through Ajax call it can communicate with the API and API communicate with the ActiveX object situated on the client machine. Since API also resides in Client machine that why there is no problem in communication. This API works as mediator between Chrome browser and ActiveX.
During API implementation you might encounter CORS issues, Use JSONP to deal with it.
Pictorial view of the solution
Other solution : Use URI Scheme like MailTo: or MS-Word to deal with outlook and word application. If your requirement is different then you can implement your customized URI Scheme.
ActiveX is supported by Chrome.
Chrome check parameters defined in : control panel/Internet option/Security.
Nevertheless,if it's possible to define four different area with IE, Chrome only check "Internet" area.

GWT: add-linker (cross-site) doens't work with Server code!

I am trying to do some cross-site in GWT.
According to GWT:Same Origin Policy I've added to the module xml file.
It is working okey as long as I am not calling any GWT remote service (using GWT-RPC), but when I try to call any remote service, I got no response!
Any one know how to fix cross-site issue in GWT with GWT remote services?
Thanks in advance!
Steve's answer is correct, however there is one other option you can consider which is the best approach if you want to require authentication for server interaction without using OAUTH. The main point is that the cross-site linker doesn't bypass the SOP, but allows you to host the index.html on a different site than the JS code so that you can have the JS code and servlets on one server and load them from another. To get around the SOP you can use a method called JSON with padding or JSONP. Essentially what it does is use a script tag to inject a foreign request into the environment by wrapping the requested data in a callback. To do this you can use one of many server-side implementations such as Jersey. GWT 2 includes a JsonpRequestBuilder object which does all the client-side work for you and can be used in the same way as RequestBuilder. See this article for a tutorial.
If you want to access some other server (example.com) from your GWT app, then you'll have to do an RPC to your server, and in your server-side code, you'll have to make another HTTP call to the example.com page you're looking for.
The page you linked to regarding cross-site linking outlines that adding <add-linker name="xs"/> to the module file allows you to split your hosting between 2 servers:
One server for static files (all GWT produced html and js files, and all images)
One server for dynamic calls (all your RPCs go here, and your index.html home page must be here)

Help with ASP.NET MVC 2 Routes

Is there any reason why a route would be properly mapped in one environment and not another? I am deploying the exact same routing information from my local development server to a production server, and the routes are not being evaluated the same.
I have downloaded Phil Haack's Routing Debugger, and it is confirming that the routes are matching locally, but not in production.
Has anyone ever experienced this?
UPDATE: I didn't include many details above. The production server is IIS 6 on Windows Server 2003. All my routes were working except for one that I was using as a custom image handler. The route I specified was mapping to a URL that ended with ".png"
I found that this was the problem with IIS 6 since it was not handing off the ".png" request off to ASP.NET. I added a wildcard mapping to the site and that fixed the problem.
I apologize for not having put more details before. Hope this helps someone else.
There's a couple of things at work. As you mentioned, IIS 6 doesn't hand off requests that aren't mapped to the ASPNET_ISAPI.dll. A wildcard mapping fixes that problem.
The other potential issue is that by default, routing doesn't route files that exist on disk. So if you make a request for a physical .png file, it won't get routed.

Silverlight 4.0 + MVC 2.0 + WCF RIA Services + EF 4.0 = Load Error

I'm trying to buid a site with the following:
VS 2010 (for the updated WCF RIA Services)
Silverlight 4.0 (packaged with WCF RIA Services).
MVC 2
EF 4.0
I am setting it up so that the public facing pages will be html from MVC, but the administration portion will be a silverlight navigation application using using WCF RIA Services for data access.
When I create the silverlight application within a webforms application, it works (I am able to add a datagrid and retrieve data using EF 4.0 and WCF RIA Services successfully):
alt text http://www.patleague.com/images/sl4_webforms.png
When I create the silverlight application within an MVC2 application:
alt text http://www.patleague.com/images/sl4_mvc2.png
I get an error as follows (I've added the same datagrid in both cases - a simple table with 2 records):
alt text http://www.patleague.com/images/sl4_mvc_dataerr.png
The webforms server-side works while the MVC server side doesn't. I've unsuccessfully tried WCF logging as well as fiddler, but I somehow can't get any output (using the example here: http://msdn.microsoft.com/en-us/library/ms730064.aspx), and I've also tried fiddler to get some information with no luck. I'm really struggling with this and I wonder if anyone else has run into this issue and found a way around it?
Thanks, Dennis
Ignoring the routes for the services corrected this problem when added to Global.asax.cs:
routes.IgnoreRoute("{*allsvc}", new { allsvc = #".*\.svc(/.*)?" });
Credit for this answer has to go to OneSmartGuy: his answer fixed my issue also.
This issue might be specific to my site, but perhaps other people are having the same issue, and I had been so darn frustrated by this that I had given up for a while and tried other methods to get done what I wanted, but came back to Silverlight because I have a hard time with Javascript and JS UI libraries. I had better luck with fiddler when working on the deployed site (I didn't get any output when working with the development server).
When I browsed to my site with the silverlight app, the dialog popped up with the usual "load operation failed for query...", and fiddler showed the following when highlighting the error:
IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.
I looked up this error in the DiscountASP.net (my hosting provider) and found a KB article that instructed me to update the web.config (for IIS7) as follows:
<system.webServer>
<security>
<authentication>
<basicAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
And viola! I could use WCF RIA Services with Silverlight in asp.net MVC2! I found also that it was unnecessary for me to create a special service and a domainhostfactory as described in several blog posts while researching this stuff, or change the routing to avoid interactions with MVC and the service request. This is all I had to do
I guess this is a pretty basic fix, and hopefully it'll help someone else. I was extremely frustrated with this, and dissapointed that such a simple fix is publicly available, yet no step-by-step instructions for this scenario is given from Microsoft as this is using the most up-to-date microsoft technologies.
Thanks, Dennis