Error 403 when using Global.asax with VS 2005

A

Al Santino

Hello,

I've created a simple C# web services project using Visual Studio 2005. My
service compiles and runs correctly when called by remote clients.

I'm able to step through the service in the debugger unless I add a
Global.asax file. When I do that and then try to run the debugger I receive
error 403. If I remove the Global.asax file things work fine. The
Global.asax file is the one generated by VS 2005 - I don't try to add
anything to it and receive the errors.

I've been through the past threads and tried the suggestions from here:

Title: BUG: Permissions Error When You Try to Debug an ASP.NET Web
Application
URL: http://support.microsoft.com/default.aspx?scid=kb;EN-US;319842

PRB: "Access Is Denied. Check the DCOM Configuration Settings for the
Machine Debug Manager" Error Message When You Debug ASP.NET Applications
http://support.microsoft.com/default.aspx?scid=KB;en-us;q306164


and a variety of other sources. Nothing seems to work.

I'm running under a local Admin account on Windows XP Pro and service packs
are up to date. The project in on my computer (localhost). Can anyone point
out what I may be doing wrong?

Thanks.

Al
 
J

Juan T. Llibre

re:
Can anyone point out what I may be doing wrong?

1. The simplest solution of course, given that apparently you don't need
any global functions, is not to include a global.asax in your web service fileset.

2. Something else you can do is download sample code for web services,
and check for glaring differences in the sample's global.asax and yours.

Here's one :
http://www.codeproject.com/vb/net/xywebservicedispatcher.asp

3. When you open your global.asax in the VS IDE, do you see a squiggly
line under the "Application Language" line at the top of the code ?

If you do, when you right-click it, do you have an option
available to "move global.asax" into the project ?

What happens if you move it ? Does that help ?

4. Check the filename for the global.asax created by VS.
Is it Global.asax...or Global1.asax ?
 
A

Al Santino

Thanks for the response, Juan. I address your comments inline...

Juan T. Llibre said:
re:

1. The simplest solution of course, given that apparently you don't need
any global functions, is not to include a global.asax in your web service
fileset.

Actually I do need it - I plan to use the session related functions. I
wanted to begin, though, by adding the file using VS and then stepping
through it in the debugger to verify the order of events. As I mentioned in
my post, I can step through the program in the debugger before I add
Global.asax but not afterwards.
2. Something else you can do is download sample code for web services,
and check for glaring differences in the sample's global.asax and yours.

I'll do that. Again, I'm using the file VS generated with no changes.
Here's one :
http://www.codeproject.com/vb/net/xywebservicedispatcher.asp

3. When you open your global.asax in the VS IDE, do you see a squiggly
line under the "Application Language" line at the top of the code ?

No said:
If you do, when you right-click it, do you have an option
available to "move global.asax" into the project ?

What happens if you move it ? Does that help ?

If I remove it I can then use the debugger again. I'm not sure where I
should move it.
4. Check the filename for the global.asax created by VS.
Is it Global.asax...or Global1.asax ?

It is "Global.asax".


Thanks again for your suggestions.

Al
 
A

Al Santino

You can ignore my original post. I was clicking "run" when the Global.asax
file was displayed rather than the main file.

Sheesh.
 
J

Juan T. Llibre

Oops...
Sometimes it's the little things which get us.

Glad you caught it, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top