简体   繁体   中英

Web Service (asmx) with different external port causing error on invoke

previously we have webservice (asmx) located at our main server with external port 80 and was able to invoke the webservice correctly

now we rellocate it to another server with external port 208. we are able to call the page just fine. But on invoke it returns

Server Error in '/' Application. The resource cannot be found.

Url of web service http://X11.XX5.XX3.X35:208/SB_MWS/SB_MWS.asmx?op=CheckUser

Response URL on Invoke http://X11.XX5.XX3.X35/SB_MWS/SB_MWS.asmx/CheckUser

Notice that the response URL no longer points to 208 thus giving the error. What setting do i have to set to enable this port?

One reason this could occur is if you don't have a start page set under your web project's properties. So do this:

Right click on your project

Choose "Properties"

Select the "Web" tab

Select "Specific Page"

Assuming you have a controller called HomeController and an action method called Index, enter "home/index" in to the text box corresponding to the "Specific Page" radio button.

Now, if you launch your web application, it will take you to the view rendered by the HomeController's Index action method.

(or)

Simply, you could also open one of the controllers in your project and then hit on F5 or Ctrl + F5.

What's happening now is that, you are currently in your /Views/home/Index.cshtml view and you just hit on F5 or Ctrl + F5. In an mvc project, you cannot open a file w/ .cshtml extension directly as IIS cannot understand that. The controller is supposed to return a matching view from within the action method.

If my answer doesn't help, I am sorry.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM