WebService on IIS with IIS-Manager - asp.net

I just created a simple test WebService with Asp.net called
MyWebService.asmx
I can't access it from exteriour, cause Visual Studio don't allow this..
So I wanted to make a own IIS Webserver to host my Webservice, but
how do I add my "MyWebService.asmx" to the IIS with the IIS-Manager?
Hope someone can help me.. Google didnt help me a lot

You have to publish this WebService (right click on the project -> Publish) and host it using IIS like a regular Web Application.

Just create a new application, as you would do if you create a "real" ASP application
put, for completeness and to be sure the app is running a default.aspx into the root dir, which says something like "app is running!"
put the ASMX file into the directory (i think it will be place in the APP_CODE directory, but i'm not sure 100%)
config your webservice in the global.asax, without it nothing will happen (hint: also configure the help page for webservices, otherwise users accessing it will get the interface description in the browser)
A longer description of that can be found here: http://msdn.microsoft.com/en-us/library/8wbhsy70%28v=vs.80%29.aspx

Related

Getting 404 error in IIS when calling asp page

I have a problem with my asp.net 4.0 application. When I call it on the server, it works, but when I call it from outside the server, it gives me a 404 error.
The link I call the asp.net application from is the good one. Other asp.net 4.0 applications are working fine when called from outside the server. The other applications are in another folder though, but I do not see why it would work under a folder and not another one. There is no IP restrictions on the applications.
Anyone got that error int eh past?
Thanks
EDIT:
The app is configured as an asp.net 4.0 application. it is stored in a virtual directory.
This link works:
http://localhost/Phonebook/PhoneBook/default-defaut.aspx
this link does not : https://www.test.com/Phonebook/PhoneBook/default-defaut.aspx
A coworker and me found the answer. It's because the server I called on my url was supposed to have a rule redirecting the browser to the right url. So IIS7 on my test server was setted up right.
Theres several things to check.
That test.com is even going to your server. Put a file in the root directory 'test.txt' that IIS lists as the root folder for your site. ensure you can get to it.
Once you verify your root site folder WORKS for ex., www.test.com/test.txt then ensure you have a virtual directory /phonebook that contains a folder phonebook within it.
Seems overkill to be having to folders named phonebook. Try taking one of them out and pointing your web application to your
c:\whatever\phonebook\phonebook folder.
Make sure port 443 is bound to your app if you're using https, that could be your problem.

can asp.net routing 3.5 sp1 do this issue?

I have a folder(/MyFolder/) with a dedicated web.config in it that does an impersonating
In that folder I have an asp.net file that use Microsoft report viewer 8.0 named MyReport.aspx
When I view this folder on my machine, it's working perfectly without issue
When I publish my project to the dev server and I'm trying to view the report, I have an issue where the the user that run IIS doesn't have access to something, (rsAccessDenied)
Can asp.net routing cause this issue?
(I'm not at work right now so I can only go by memory so it will be hard to provide more information)
Your impersonation is probably not set up correctly. Check the User.Identity.Name when running locally and on the server.
http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx
In the end, asp.net routing was causing this issue, the web.config wasn't getting loaded.
I had something like this:
http://ip/myreport.aspx
I had to change it to
http://ip/reports/myreport.aspx
I had to have the folder in which the web.config was located in the url

IIS 5 & ASP.NET MVC Directory Browsing Problem

We configured IIS 5 by mappping * to asp.net handler so that ASP.NET MVC works. After configuring this, directory browsing is not working.
Also uploadify jquery plugin is not working. Showing IO error 2038.
Can someone please suggest us how to enable directory browsig with ASP.NET MVC configurations on IIS 5?
I don't think that you'll be able to get directory browsing to work with ASP.NET MVC in the same application. When you added the wildcard mapping, you told ASP to handle every request. If the request doesn't map to an actual file, it will try to match a route in MVC. If there isn't a matching controller with an index (assuming that's your default) action, then it will fail.
My suggestion is to split your web site into "application" and "content". Set up the application as a separate web site and apply the wildcard mapping there. Leave your content with the original configuration. I don't use IIS5 any more -- with one exception on an old XP development box -- I'm afraid that can't really be of more help.
If I were you, though, I'd upgrade to a more recent OS and web server. Expecting new technology to work on a decade-old platform is very optimistic.

How do i run ASP.NET code on a server outside of VisualStudios

I was able to run Default.aspx but i think i am doing this wrong. I uploaded my ASPX files and Global.asax to httpdocs i did a simple test to see if there was any URL rewriting and there was none (which every page requires except for Default.aspx). I am unsure how to properly upload and run this.
Please see Setting up your ASP.NET server (IIS) - this tutorial will help you set up ASP.NET under IIS6.
Right-click your site in Solution Explorer and choose "Publish Web Site".
You'll need IIS.
http://www.iis.net/

.net webservice publishing process question

I have a webservice that exists in an asp.net website. When I publish the site to a test server I have to go into the bin folder and into the .svc file for the service and manually change the URL to correctly reflect the test server URL. Is there a better way to handle something like this?
You could always run a build tool to automatically do this for you.

Resources