Solved

Wrong asmx file is coming up under Browse in IIS

Posted on 2010-08-27
11
714 Views
Last Modified: 2012-05-10
I have a Visual Studio project for my web service, which has multiple asmx files.  In VS I set a certain page as the default, and see it opens correctly in Visual Studio 2008 when I select Run.  When I publish it to IIS 5.2, the wrong page opens when I browse.

How do I set the correct page in IIS 5.2 on Windows Server 2003?

Thanks,
newbieweb
0
Comment
Question by:newbieweb
  • 6
  • 3
  • 2
11 Comments
 
LVL 30

Accepted Solution

by:
Brad Howe earned 300 total points
ID: 33547487
Hi,
What you need to do is open IIS Manager and set the default document from the TAB Document.
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/dc6eb1b4-9028-4308-9935-52b64edfad36.mspx?mfr=true
 Cheers,
Hades666
0
 

Author Comment

by:newbieweb
ID: 33547575
I actually had done exactly as described in the link, before I posted the question.  Problem was that the page I chose did not come up. Instead a page listed each document in the folder is what came up.

I guess it really does not matter, so long as I can access the page explicitly from my code. But I think I can not.  I am using LogMeIn to go to the server and so can not take a screen shot of what I am seeing.

I have the web service running, and have it getting consumed into a Windows program running on the same PC.  I used localhost in the URL.

When I call the web service I get an exception:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MobileServiceMgr.GetPendingEventRecordsByStoreID(String storeID, Credentials c)
   --- End of inner exception stack trace ---

When I add a watch for the web service I see all nulls.


So I think something is missing here relating to the default document.

Any ideas?


0
 
LVL 30

Assisted Solution

by:Brad Howe
Brad Howe earned 300 total points
ID: 33547625

Hi,

Does the webserver have the Mime extention to serve .asmx extentions?
http://support.microsoft.com/kb/326965

When you browse the site from the server http://localhost/service.asmx, do you get a config error OR a 404?

Have you tried remove custom errors to =Off to see the possible error?

Let me know,
Hades666
0
 
LVL 6

Assisted Solution

by:radnbne
radnbne earned 200 total points
ID: 33547646
To test hades666 advice that there is nothing to handle the asmx request, create a simple test file called default.html (or whatever other file is in your default document list) and place it in the directory.  If the test file is displayed instead of the directory list, then hades666 is correct and nothing is setup to handle the page type .asmx
0
 

Author Comment

by:newbieweb
ID: 33547660
It's IIS 5.2, and it served the prior asmx page.  I added the one I wanted, and when putting that on top did not work, I deleted the other one.

It just changed modes and started displaying all documents in the folder.

When I browse the site from the server:
http://localhost/service.asmx and
http://localhost:8182/service.asmx

I get the error:

The page cannot be displayed
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.


Where do I remove custom errors?  I see only a Tab page called Custom Errors, but do not see how to turn them off.


0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:newbieweb
ID: 33547676
No, I created a default.html and placed it in the same folder, clicked Refresh from IIS.  I browsed and it showed the directory listing, not the blank page.
0
 

Author Comment

by:newbieweb
ID: 33547680
I had checked "Directory Browsing" earlier.  But now I see it does not change the behavior by unchecking it...
0
 
LVL 30

Assisted Solution

by:Brad Howe
Brad Howe earned 300 total points
ID: 33547687
Hi,
So you have no default document loading.... Is default.html added as a default file in the documents tab.?
and if you browse the page directly http://localhost/default.html does it load?
What about http://localhost/page.asmx?
-Hades666
0
 
LVL 6

Assisted Solution

by:radnbne
radnbne earned 200 total points
ID: 33547694
Also have you tried restarting IIS after making your changes?
0
 

Author Comment

by:newbieweb
ID: 33547700
No, I have not restarted IIS.  Let me try now...
0
 

Author Closing Comment

by:newbieweb
ID: 33601845
Thanks.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
inactive users 13 70
OPINIONS please : best Active Directory Monitoring tool 5 116
Creating csr file for SSL 4 48
Registering DLL 5 43
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now