Classic asp: assigning value to a session variable - asp-classic

I have this weird problem, which I never encountered before. Fairly simple operation, which now all of the sudden gives me a headache:
Session("myVar") = Request.Form("myFormVar")
This gives me an error "Error occured, please contact the administrator... blabla"
I was trying different approaches and the only way I can temporary make it work is to just double the statement:
on error resume next
Session("myVar") = Request.Form("myFormVar")
Session("myVar") = Request.Form("myFormVar")
This 'works' but it's not a clean longterm solution.
The page is a redirect page where I do some actions and redirect to a result page. I just can't figure out what is happening. Did anybody encounter something like this before?
Thanks!

Ok, I solved it. In my code I had Request("myFormVar") iso Request.Form("myFormVar"). I changed it and now it works fine. However, it's strange that it works on local IIS in Win 10 and it used to work on Win 2008 IIS 7.5 and now not anymore. I was told that some security patching has been done on our servers, so maybe that has something to do with it.

Related

IIS 8.5 "Connection was reset" Error on Chrome When Posting, but Works For Get Requests

I have been working on an intranet site and recently users have been complaining that when they save a change they get "This site can’t be reached." The users are using Chrome exclusively as far as I can tell, and when I tested with Edge, I got no errors. So, I first tested on the web server, I was unable to recreate the issue. I tried on another server within the network and I was also unable to recreate the issue. I then tried my pc, which was connected through a VPN and was finally able to recreate the issue. What is weird is that this just started happening and I haven't updated the site in quite awhile. The can view most pages and the issue only seems to happen when posting to IIS. At this point, I am not sure where to start to troubleshoot this issue. Any help would be appreciated.
Edit: Updated the title to show the actual error I got.
Edit 2: Someone put me on to checking the httperr log and I see an error for the post request with client_reset as the error message. hope that makes the issue a bit more clear.
I found the issue with help from the network security firm the client was using. Once I was able to confirm the issue only occurred when clients who were using a VPN, he ran some tests. The issue was that the firewall was blocking posts that seemed suspicious. Now, this site has been running for years with no issues. My assumption is that they made some security changes and it caused this problem. What was odd, was that I tried a few fixes and they would work for a few times and then would stop working, such as using the site ip address versus the domain name. I hope this helps the next person.
Wade

Strange double postback in asp.net because of IIS setting

I have the follow problem. There is an asp.net application running on 5 different servers. On most of them everything is normal. Each page is doing single postback before rendering the result. On only one server we faced very strange problem. The page is rendered with the single post back, but after that, there is another second postback call even the html result is already displayed in the browser. I believe it's because of IIS configuration, but it's my first time facing such thing. Please advice if you have any idea. Always there is a solution to reinstall the fifth server but we won't know why.
Unfortunately the code is the same on all of the servers. Also they are working at same platform (windows server 2008 r2 + IIS 7.5). It could not be because of bad html syntax. The other servers work perfect. The fifth server is still not re-installed, but may be this will be the solution. We've already spent a lot of time searching for the answer, but it looks as strange as it is. I'm not sure if I successfully described it. The additional post back is not a real post back, because the html is rendered, the page is displayed, but the debugger goes one more time through the code. Otherwise nothing else happens. I wonder why the debugger will go again through the code as it won't change anything on the client side. Because on the browser side it seems as the request is finished, the result is received and everything displayed on the page. If you're not debugging it with VS, you won't find any difference - all the 5 servers looks as working equal. If the problem is not a setting in the IIS, it could be a setting in the VS, but which one and why???

ASP_0147 | 500_Server_Error

This issue has been happening for a while, and it's suspected to be session related since it pertains to the users browser. Opening a new browser (session) rids the issue. The application uses Global.asa (Only Application_OnStart and Sub Session_OnEnd, the rest are empty), Classic ASP (VbScript), IIS 7.0.
This error keeps popping up on url's which happen to be loading fine, until the page is refreshed for the second time, then it bogs out and even times out. In the same browser, if i even try to open that entire website, it times out at this point. For about 350000ms and then everything starts working again. Very weird!
If anyone can help with this, I haven't had any luck anywhere finding what may be causing this, besides something that has to do with the sessions, maybe in the application pool.. I'm not sure.. Any help on this would be appreciated.
Sometimes Google AdSense might cause such problems, disabling it should solve your issues.
To cure the real "root" of the problem and keep using AdSense, guess you'll have to contact Google.

jgrowl on iis5

for some reason jGrowl does not want to work on my IIS 5 (live) server, but works perfectly on my IIS 6 (staging) server. has anyone else experienced this problem or is it just my setup?
on iis5 i'm getting an "Object doesn't support this property or method" error
jGrowl (and jQuery) don't run on the servers, they run on the clients. Because of that, I'm thinking your problem is elsewhere. You could back up, and try the following code to be sure jQuery and jGrowl are functioning properly.
$(function(){
$.jGrowl("I work!");
});
Also, if you could post a simple example of how you're using jQuery + jGrowl, that would help diagnose the issue as well.
What browsers have you tested this in? Are you absolutely positive you are referencing the plugin-source in your page? Try copying/pasting the reference source from your code directly into your url.

Intermittent Problems loading type

I have a SharePoint site that I have added a few extra pages to in order to handle some custom AJAX requests.
Every now and then, about once a week, I get a call saying it's not working. When I look into it, the error I'm receiving is:
Could not load type 'My_Controls.Control_Name' .
Where My_Controls.Control_Name is the name of the page. An IIS restart solves the issue and gets it running again, but this is obviously of great concern to the client.
I have tried everything I could think of. In the past when I encountered this, setting compilation batch="false" usually did the trick, but this time it isn't resolving the problem.
Obviously this is a pain to troubleshoot because there isn't a way to reproduce the bug (it just pops up from time to time) and a simple IIS restart solves it.
Does anyone know what may be causing this or ideas to try and fix it?
Thanks

Resources