4 Replies - 3376 Views - Last Post: 27 January 2009 - 08:24 AM Rate Topic: -----

#1 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,661
  • Joined: 23-August 08

Deploying an ASP.NET Webapp With IIS 7.0

Posted 26 January 2009 - 11:52 AM

Sigh...I am so used to Linux webservers and PHP that this makes my head hurt.

So, I'm trying to setup an ASP.NET web service on a Vista Ultimate system with IIS 7.0. Unfortunately, the love just isn't there for me. I created a new local user, a new AppPool using this user, and a new application in IIS, and copied over the solution files.

Whenever I attempt to access the .asmx page through the browser, it tries to redirect me to login.aspx, but I don't have one (nor do I want one...this will be behind a firewall and accessed solely from another Linux-based server).

Relevant log:
2009-01-26 18:34:47 ::1 GET /export/ExportService.asmx - 81 - ::1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.9.0.5)+Gecko/2008120122+Firefox/3.0.5 302 0 0 0
2009-01-26 18:34:47 ::1 GET /export/login.aspx ReturnUrl=%2fexport%2fExportService.asmx 81 - ::1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.9.0.5)+Gecko/2008120122+Firefox/3.0.5 404 0 0 0


Anonymous Authentication is set to use the AppPool's configured user. ASP.NET Impersonation is off.

How do I get it to stop the login redirect??

Thanks!
Jack

Is This A Good Question/Topic? 0
  • +

Replies To: Deploying an ASP.NET Webapp With IIS 7.0

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Deploying an ASP.NET Webapp With IIS 7.0

Posted 26 January 2009 - 11:57 AM

You cannot navigate directly to an ASMX file (Web Service), it is simply an "in between" service for either a web application or a Windows application. If it is being accessed via a web application, add a Web Reference to your Web Service and access it that way (actually it's the same for a Windows Application as well). It's Project (Or Website) > Add Web Reference

Check out this MSDN Article on adding a web reference to your project. Hope this helps :)
Was This Post Helpful? 1
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,661
  • Joined: 23-August 08

Re: Deploying an ASP.NET Webapp With IIS 7.0

Posted 26 January 2009 - 12:26 PM

Thanks for the reply, PC.

Well I had it working within Visual Studio 2008 (View in Browser brought up the service description page, for example), built a test client with which it worked and I could step through and all, so I said...hell, let's try it from Linux.

Well, the VS.NET dev server only accepts local connections, so that didn't work, so I went off to look into IIS world. And that's been an exercise in futility. So far everything I try with IIS has been a failure; prior to the web service route I was going to try a REST solution, and I couldn't get an HTTP PUT to work either (through WebDAV).

Now I can't even get the web service to work locally. I deleted my local client's web reference, and when I try to retrieve it now I get the same error:
There was an error downloading 'http://localhost:2083/login.aspx?ReturnUrl=%2fExportService.asmx'.
The request failed with HTTP status 404: Not Found.


There's something subtle I'm missing, I'm sure of it.
Was This Post Helpful? 0
  • +
  • -

#4 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1526
  • View blog
  • Posts: 5,961
  • Joined: 21-March 08

Re: Deploying an ASP.NET Webapp With IIS 7.0

Posted 26 January 2009 - 07:49 PM

View PostPsychoCoder, on 26 Jan, 2009 - 01:57 PM, said:

You cannot navigate directly to an ASMX file (Web Service), it is simply an "in between" service for either a web application or a Windows application. If it is being accessed via a web application, add a Web Reference to your Web Service and access it that way (actually it's the same for a Windows Application as well). It's Project (Or Website) > Add Web Reference

Check out this MSDN Article on adding a web reference to your project. Hope this helps :)


I access the webservice that I created directly through the browser. I allows me to view the web methods that I have created.

JackOfAllTrades, are you using a web.config file? Are you using any type of forms authentication? Being redirected to a login form sounds like it's trying to do a forms authentication.

Attached image(s)

  • Attached Image

This post has been edited by eclipsed4utoo: 26 January 2009 - 07:50 PM

Was This Post Helpful? 1
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,661
  • Joined: 23-August 08

Re: Deploying an ASP.NET Webapp With IIS 7.0

Posted 27 January 2009 - 08:24 AM

Thanks, eclipsed4utoo. Yes, it appears that Forms configuration was set in the web.config. If I comment it out, I get a 401.2 error, I guess as expected.

So I fidddled and diddled and Googled and got it going by setting <authentication mode="None" /> and <authorization><allow users="?" /></authorization>. It at least got me the service description page.

Muchas gracias!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1