Re: VS2008 HTTP 403 Help!!



Juan,

I figured it was something simple....cause it was so hard to solve.....
Seems like the web app project does not default to the ONLY aspx in a
project during debug run. Highlighting the default.aspx before debug start
or explicitly setting Default.aspx to the start page works. Otherwise in
debug it will not search for the default or index files to run - it just
HTTP 403s.

I don't remember every having this problem before VS2008....course I've been
doing mostly smart device apps until last week or so so maybe i'm just
really rusty....

Thanks for all your help....

Harry

"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:OHtfHl14IHA.1192@xxxxxxxxxxxxxxxxxxxxxxx
Juan,

Case is at
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=355757
if you're interested. Ironic thing was When I was going through the
routine which had failed so many times to do the bug report, it worked!
But I cannot find a way to get these other apps to work correctly at
all....

Thanks
Harry

"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:%23iB71Is4IHA.4988@xxxxxxxxxxxxxxxxxxxxxxx
Thanks Juan!

I tried the workaround and could never get it to work - I'll send this to
MS and maybe somebody can help. It's amazing that we're the only two
people in the world that have ever run into this to date....

Harry
(have bug, will find....)

"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:eFX4%23Xh4IHA.1192@xxxxxxxxxxxxxxxxxxxxxxx
re:
!> what's the url to the "Connect site" ?

http://connect.microsoft.com/

You'll need to use your Windows Live ID to sign in.
If you don't have one, create one and then sign in to Connect.

re:
Also now after doing this I've getting the following error on build
!> Error 1 It is an error to use a section registered as
!> allowDefinition='MachineToApplication' beyond application level.

That error is caused by a virtual directory not being configured as an
application in IIS.
Check in your IIS Manager, and make sure you created a virtual directory
for your app.

re:
!> Looks like when you publish this it just reverts to using the old dev
server
!> and not IIS http://localhost:4788/TestWebApplication/
!> which does work but I want to use IIS

You need to open the property pages for the project, and configure the
"Use custom server"
option to http://localhost/ApplicationName/, (the same virtual directory
name created in IIS)
and you will be able to browse the project from within VS 2008 using
IIS.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:%23NJYc8g4IHA.1192@xxxxxxxxxxxxxxxxxxxxxxx
Sure Juan - what's the url to the "Connect site" ?

Also now after doing this I've getting the following error on build
Error 1 It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS. D:\_VS2008
PROJECTS\TestWebApp\TestWebApp\Web.config 70

Seems like the publish took away the projects web app status.

My project now looks like "D:\_VS2008 PROJECTS\TestWebApp\

Looks like when you publish this it just reverts to using the old dev
server and not IIS
http://localhost:4788/TestWebApplication/
which does work but I want to use IIS........

what's the url to the "Connect site" ?

Thanks
Harry

"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:uhqK6fg4IHA.784@xxxxxxxxxxxxxxxxxxxxxxx
re:
!> Just when I switch to IIS in VS2008 project properties - WEB do I
run into problems

I just reproduced what you're seeing.

I think it may be related to VS 2008 running ASP.NET apps as
MachineName\Administrator,
while IIS runs them as MachineName\ASP.NET_account, in your case :
MachineName\ASPNET
and in my case, MachineName\Network Service.

What I don't understand is why the MachineName\ASP.NET_account's
permissions don't take hold,
even though the account is explicitly granted access permissions.

I did find a workaround for your problem which, as mentioned, I was
able to reproduce.

What I did was *publish* the project to a disk-based directory.
Then, I created a virtual directory in IIS which points to the
directory where the project was published to.

After that, using the option "Open web site" in VS 2008,
allowed me to open, edit and run the published project.

Also, if I open the property pages for the project,
and configure the "Use custom server" option to
http://localhost/ApplicationName/,
(the same virtual directory name I created in IIS) I can also browse
the project from within VS 2008 using IIS.

So, while this is a good workaround, it looks like you found a bug.
Can you file a bug report at the Connect site ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:umLZ7Ee4IHA.4856@xxxxxxxxxxxxxxxxxxxxxxx
Thanks Juan

Got
ASP.NET is running as the account : SIMPSON2\ASPNET

And the physical directory the virtual hits has full access granted
to ASP.NET Machine Account (SIMPSON2\ASPNET)

VS2008 defaults to using the personal server - which works fine - no
HTTP 403 error with it. Just when I switch to
IIS in VS2008 project popreties - WEB do I run into problems
Could it be here that things a screwed up?

I set the project URL to the virtual directory
http://localhost/TestWebApp

Thanks
Harry

"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:u4Z5V2T4IHA.3624@xxxxxxxxxxxxxxxxxxxxxxx
re:
!> And I've given full rights on the directory where the web app
actual files reside...

To which account did you give rights to ?
Which OS are you running VS 2008 on ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:%23p0NPUT4IHA.5060@xxxxxxxxxxxxxxxxxxxxxxx
And I've given full rights on the directory where the web app
actual files reside...
"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:ep94NMT4IHA.4856@xxxxxxxxxxxxxxxxxxxxxxx
Those were the first things I checked. Yes.
It creates a virtual directory in the project properties. When I
go into IIS I see it as a web app.

"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:eryFRET4IHA.5060@xxxxxxxxxxxxxxxxxxxxxxx
Is your ASP.NET application running as an IIS application ?
Does the account ASP.NET runs as, have read permissions to the
app's physical directory ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
news:ecge97S4IHA.1952@xxxxxxxxxxxxxxxxxxxxxxx
I've been away from ASPNET - I open up a new Web app in VS2008
and go into properties and select to use IIS
instead of the personal web server. Then I run in debug mode and
it says I have to set the Debug= True in the
Web.config which I do. Then try to run it again and it says I
must enable integrated security which I do. I then
try to run it again and get the HTTP 403 error - " This error
(HTTP 403 Forbidden) means that Internet Explorer
was able to connect to the website, but it does not have
permission to view the webpage."

What have I got to do to get around this to debug a simple
ASPNET app?

TIA
Harry
























.



Relevant Pages

  • Re: VS2008 HTTP 403 Help!!
    ... Sure Juan - what's the url to the "Connect site"? ... Seems like the publish took away the projects web app status. ... and not IIS ... I created a virtual directory in IIS which points to the directory ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VS2008 HTTP 403 Help!!
    ... the web app project does not default to the ONLY aspx in a project ... Highlighting the default.aspx before debug start or explicitly setting ... That error is caused by a virtual directory not being configured as an ... Check in your IIS Manager, and make sure you created a virtual ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VS2008 HTTP 403 Help!!
    ... which had failed so many times to do the bug report, ... Check in your IIS Manager, and make sure you created a virtual directory ... Seems like the publish took away the projects web app status. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VS2008 HTTP 403 Help!!
    ... Check in your IIS Manager, and make sure you created a virtual directory ... Seems like the publish took away the projects web app status. ... even though the account is explicitly granted access permissions. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VS2008 HTTP 403 Help!!
    ... That error is caused by a virtual directory not being configured as an application in IIS. ... even though the account is explicitly granted access permissions. ... And I've given full rights on the directory where the web app actual files reside... ...
    (microsoft.public.dotnet.framework.aspnet)