Questions tagged [global-asax]

A special file in the ASP.NET framework, it provides a simplified interface to create hooks into system events in the life cycle of a web application and web pages in that application.

A special file in the ASP.NET framework, it provides a simplified interface to create hooks into system events in the life cycle of a web application and web pages in that application.

Most often used to define resources which need to be globally defined for use by all web pages and services.

1047 questions
0
votes
1 answer

Application Restart for folder deleted,added,updated

Modifying, adding, or deleting certain types of files within the application's known folders will cause the application to restart.But when Log file in application is updated,why application is not restart. Then PropertyInfo p =…
amm
  • 27
  • 1
  • 10
0
votes
1 answer

Send code from Global.asax file to default.aspx

I have a default.aspx page that sometimes will cause an exception that gets caught in the Global.asax file. How do I send data back to my default.aspx page to change the HTML output without doing a page refresh? Is that possible?
cdub
  • 24,555
  • 57
  • 174
  • 303
0
votes
2 answers

Is Global.asax file in App_Code.dll

How do I deploy a Global.asax file? Does it get compiled in release mode to the App_Code.dll?
cdub
  • 24,555
  • 57
  • 174
  • 303
0
votes
4 answers

ASP.NET 2.0: Problem in Httpcontext.current.session.add()

Can anybody help me to find out solution of following problem. In ASP.NET website: at Application_OnPostAuthenticate() event, whatever code i write is executed for every request. therefore due to this customidentity object, countryid and weatherid…
Hemant Kothiyal
  • 4,092
  • 19
  • 61
  • 80
0
votes
1 answer

MVC3 Error message globalization

I'm really lost trying to create custom generic validation messages for my MVC3 application. I read many tutorials and the biggest part of them suggest one of these options: Create an App_GlobalResources folder and inside that put my custom…
IPValverde
  • 2,019
  • 2
  • 21
  • 38
0
votes
1 answer

Handling Session time out in mvc3

In my mvc3 (razor) application i want to handling session timeout by displaying a popup for re entering User id and password How can i write it as common in Session_End() in Global.asax Is it possible to display a jquery model popup from here Is…
Nithesh Narayanan
  • 11,481
  • 34
  • 98
  • 138
0
votes
1 answer

Global.asax URL rewriting

The following works fine on my local host, but not on the server. I keep getting a page not found error. Any ideas? I also have a custom mime type setup in the web.config but that should not matter.…
Isabelle Harms
  • 375
  • 3
  • 9
0
votes
1 answer

HttpRuntime.Cache does caching on client/server side

Does the HttpRuntime.Cache which I declared in the global.asax file in asp.net web application does caching on client side or server side? HttpRuntime.Cache["Key"] Also is there any chance that we can set the sliding expiration for this piece of…
hungrycoder
  • 507
  • 2
  • 9
  • 24
0
votes
3 answers

How to Prevent Session Value Reset of Global.asax file in asp.net?

I have about 10 Session variable for storing the File Download Counts of each different 10 Categories wise. I dont know why? but my session variable that is set into Global.asax get RESET automatically. Since, the Machine is not restarted. Still the…
SHEKHAR SHETE
  • 5,964
  • 15
  • 85
  • 143
0
votes
2 answers

Change default view folder for custom Http404 error page

I want to custom error pages in my asp.net mvc3 website. So, I found this very useful post: Custom error pages on asp.net MVC3 and it works well However, my Http404.cshtml file isn't in the Views default folder. It is in a folder named BaseViews. I…
0
votes
1 answer

Possible to check if Application_Start Event fired?

I have some code that I cache on Application_Start Event and then I use it in a master page code behind file. if my cache object is empty then I log it into my error log saying it was empty. I was thinking though it would be cool to have a check…
chobo2
  • 83,322
  • 195
  • 530
  • 832
0
votes
1 answer

Getting username of last person visiting the site

I m really sorry for unclear question title but I am a bit confused about it myself. I m running my website on IIS and on the top its displaying the username of the user who is currently logged in. my website is hosted on a local server and various…
akhil
  • 1,202
  • 3
  • 21
  • 43
0
votes
1 answer

global authorization not working - results in blank page rendered

I am trying to implement a very basic login scheme for my MVC3 site. If I understand correctly, instead of adding the [Authorize] markup to each of my controller classes, I should be able to simply implement a global setting. To accomplish this,…
0
votes
2 answers

How to access value from code behind in global asax

In my page I'm regenerating session id on every button click to go to the next page. I've already saved username in my session variable (session["uname"]=txtusername.text) in the time of log in. But as I'm regenerating new session id…
Sudip Roy
  • 1
  • 2
0
votes
2 answers

If htm or html page doesnt exist then check if aspx page exists

I have moved my website from using .htm/.html pages to aspx pages. Some existing websites/bookmarks etc will be referencing the old files instead of the aspx files so i want them to be sent to the aspx version (i have kept the same naming). I dont…
Gazza T
  • 101
  • 2
  • 13