.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Windows 7, IIS 7.5 and VS2010: can't edit global.asax

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

Hey and thanks!


As the subject line notes the software in use, anyone have an idea why I can't edit global.asax in VS2010 (being ran with the 'run as administrator' advanced property check box checked)?  The file properties in explorer show local machine admins have full control (I am in that category) and also that IIS has windows auth enabled for the default web site.  What is this other level of security on here that I'm missing?  I can edit web.config, vb files and general aspx files with no problem--just the global.asax file causing a headache...





View Complete Post

More Related Resource Links

Worldly Windows: Extend The Global Reach Of Your Applications With Unicode 5.0


When using global applications, people want to communicate with others on their terms, in their own languages. Unicode 5.0 brings that ideal closer to reality.

Julie D. Allen, Michael S. Kaplan, Cathy Wissink

MSDN Magazine January 2007

Locale Hero: Enable Global Apps With Locale Builder And Windows Vista


Everything you need to know about locales in Windows Vista.

Kieran Snyder and Shawn Steele

MSDN Magazine December 2006

Quick Error messages with Global.asax

The article Quick Error messages with Global.asax was added by lykasd on Wednesday, August 11, 2010.

Error pages without any effort void Application_Error(object sender, EventArgs e) { Server.Transfer("/error.aspx"); //Displays the error page } In error.aspx add this to the content area. p>We're sorry, but the %=Server.GetLastError

I have a problem Global.asax

Master  Desing        <head runat="server"><title><asp:ContentPlaceHolder ID="TitleContent" runat="server" />    </title>    <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />    <link href="../../Content/menu/chromestyle2.css" rel="stylesheet" type="text/css" />    <script src="../../Scripts/menu/chrome.js" type="text/javascript"></script></head>   Global.asax  //Routes Event Catagory  routes.MapRoute("eventCatagory", "Catagory/{catagoriesID}/{catagories}",                                 new { controller = "Catagory", action = "Catagory", catagories = "", catagoriesID = UrlParameter.Optional }); //Routes Event Catagory Detailroutes.MapRoute("eventCatagoryDetail", "Catagory/{subCatagoryID}/{subCatagoryname}",                        &n

Using Global.asax to Set Session Variables Pulled From SQLServer

I have a custom class that pulls user information from a SQL Server table. Now that I'm expanding the site from a single page to others. I want to shift the code to the Session_Start event so that the information is always loaded when the site is accessed. How do I call my custom code from global.asax since its script and not a class. 

Do SharePoint 2007 and VS2010 have to be installed to the same Windows Server machine?

For WSS 3.0 development using VS 2005, I learned that we need to install VSeWSS to the Windows Server where the WSS 3.0 was installed.  For MOSS 2007 development using VS 2010, do we need to have VS 2010  nstalled to the same Windows Server?  Thanks, Jeffrey

How to import/transfer/put/edit Kodak PlaySport video with windows movie maker?

Kodak PLAYSPORT to windows movie maker converter is a versatile converting program to convert Kodak PLAYSPORT mov files to wmm for editing Kodak PLAYSPORT with windows movie maker. Windows movie maker can input WMV, AVI, MPG video files natively, but not for H.264 (mov) files shot by Kodak PLAYSPORT. Therefore, if you want to edit captured video footages with windows movie maker directly, you need professional Kodak PLAYSPORT to windows movie maker converter to realize it. Kodak PLAYSPORT video to windows movie maker converter can recognize all popular formats (MOV, MP4, RM, RMVB, MKV, FLV, MPG, DV, 3GP) and even HD video files recorded by Panasonic, Canon, Sony, JVC Everio camcorders (TOD, MOD, MTS, M2TS, TP, TS, AVCHD). If you only want to listen the audio without video, you can rip audio from your PLAYSPORT videos and save them as AAC, FLAC, WMA, MKA, MP3, MP2 and AC3 formats. Why do you need a Kodak PLAYSPORT camcorder? KODAK has introduced the PLAYSPORT Video Camera, a rugged, durable and pocket-size HD (1080p) video camera that can be used underwater at depths of 3 m (10 ft). It features a 2.0-in. LCD screen, low-light performance, can also capture HD stills at 5MP resolution (16:9), and accepts the 32GB SD memory card for up to 10 hours of HD movie recording. Available in Black (“Abyss”), Blue (“Wave Crash”) and Purple (“Adrenaline Rush&

Function in Global.asax is not running

Hi, I am using a Global.asax in on my webpage to run a function with an interval. In this test I have set the interval to 1 minute to be able to see what happens. I have declared a timer in the Application Start which should mean that when I open up the webpage after I have uploaded the Global.asax the timer will start.   However with this code below where I try to create a file named newFile.txt, this file is not created. I cant really understand what I could be missing. It seems that the function is not running ?<%@ Application Language="C#" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="System.Linq" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.UI" %> <%@ Import Namespace="System.Web.UI.WebControls" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Net.Mail" %> <%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.Threading" %> <%@ Import Namespace="System.IO" %> <%@ Import Namespace="System.Text" %> <%@ Import Namespace="Microsoft.Win32" %> <%@ Import Namespace="System.Reflection" %> <%@ Impo

Global.asax Application_BeginRequest

When I was in the link page is a link to the site all the program, Application_BeginRequest event in Global.asax is triggered, But my link is a link to an external time will not trigger this event, and I ask when my link is connected to an external URL, How to trigger Application_BeginRequest event Thank you.   Such as web link in the URL if connected to yahoo, I take it lead to another page.  Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs) Dim originalPath As String = HttpContext.Current.Request.Url.Host.ToLower() If originalPath.Contains("yahoo") Then Context.Response.Redirect("StopUrl.aspx") End If End Sub  

popup error (unable to edit css) VS2010 .NET 4.0

Hi!I'm getting this strange error when i'm in SplitView or DesignView and i refresh view (i'm using VisualStudio 2010 .Net 4.0). This is happening only for this page and i have never seen anything like it, neither do i understand what is goin on.Any clues?

Application level event without global.asax

I have a need to add an application level event (like Application_Start) but not in global.asax.  The reason that I can't use global.asax is because this is a web application for which I don't have source code but I want to add some functionality to it.  I need to insert an application start code and was wondering it there was anyway to do it.  I'm not sure that if I add a class or aspx page to the sie if it will dynamically compile since this is a web application.  I know this is a crazy request but let me know what you think.Also, this web site was written in .NET 2.0.Thanks.

Passing data to a Controller from global.asax


Hello all! I'm in a situation where I need to pass some information (state) to a base controller from which all of my controllers derive. In my global.asax, I'm calling a web service to get some state about the user. This state applies to every page in my web app, so the base controller needs to know about it. The state consists of about 4 fields. Is there a standard way to do this? 

I'm using ASP.NET MVC 2.

Thanks in advance for your time!


Empty Catch in Global.asax to prevent exception from stopping a web application?



I'm using a static Timer in my Global.asax to run a method at regular intervals. When the method throws an exception, my application is stopped. I have used an empty catch to prevent exceptions from stopping the application something like below code. Is there a disadvantage to use such an approach?


 protected void Application_Start(object sender, EventArgs e)

 public class TimerStarter
            private static System.Threading.Timer threadingTimer;

            public static void StartTimer()
                if (null == threadingTimer)
                    threadingTimer = new System.Threading.Timer(new System.Threading.TimerCallback(CheckData),HttpContext.Current, 0, 50000);

            private static void CheckData(object sender)
                   // a method that reading xml file from another url              
                    // empty catch to prevent stopping the application




Session end and global.asax



I'm wondering if ther's a simple way of achieving the following.

When a new session starts, I create some cookies and session objects from global.asax session start.

If a user logs out, I want to abandon the session - I presume using session.abandon, and i also want to clear the cookies.  They are set to expire after the session ends (no expiry date).  This may be an automatic thing, but I've not tested as yet.

When a user logs back in again I want to recreate those objects - in other words, kick off global.asax again.  Is that what happens or do I need to recreate manually?



Exception handling in Global.asax of ASP.net


I want to handle exceptions in my applications in Global.asax and transfer the exception to my custom error page, so that is in a central place. I want to take this exception object into my oopserror.aspx page and format it and display a custom message. i tried to use GetLastError() in my oopsError.aspx page, but my exception object was always null. Following is the code snippet that i'm using and i'm getting exception.

void Application_Error(object sender, EventArgs e)
   // Code that runs when an unhandled error occurs
   Exception exception;
   exception = Server.GetLastError();

   Session.Add("Exception", exception);


Following is the exception when the above code is executed.

{"Session state is not available in this context."}
   at System.Web.HttpApplication.get_Session()
   at UserInterface.Global.Application_Error(Object sender, EventArgs e) in C:\UserInterface\Global.asax.cs:line 51
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.HttpApplication.RaiseOnError()

Is there a way that i can securly take my session object from global.asax to my oopserror.aspx? Any ideas?

Global.asax file in WCF for different end points


Global.asax is available in asp.net application. But when I added WCF application i couldn’t find the file. I saw read in one of the questions that global.asax cannot be used for tcp endpoints.

I’m trying to use application_error method in global.asax and catch all the exceptions in this method.


How can I use global.asax with http and tcp endpoint? Or is there any other way to implement this?


Error-Installing VS2010 on Windows Ultimate(64)



I am trying to install VS 2010 on Windows 7 Ultimate(X64) edition,but I am getting an error.I downloaded the VS2010 with MSDN subscription.Not sure how to resolve this.I installed SqlServer2008R2 and Sharepoint2010 on the same machine.

Kindly tell me where I am wrong.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend