English 中文(简体)
如何利用视频演播室发展服务器获得一个网络服务,使用固定港口号码?
原标题:How to get a Web Service to use a Fixed Port Number When Using the Visual Studio Development Server?

我有一流网网站和窗口形式应用程序。

My Webservice s Location is : http://localhost:12312/MyWebSiteFolder/WSFile.asmx

Problem is : the port number keeps changing, if I reopen the solution, its going to change to something else:

http:// localhost:11122/MyWebSiteFolder/WSFile.asmx

在我重开网站解决办法时,我是否必须更新我的窗口申请中的档案位置?

最佳回答

(假定视觉演播室2010年)

Under the Web tab of the properties for the project, change the "Auto-assign Port" option to "Specific port" and enter the port you want to always use. enter image description here

Alternately, if possible, you can choose the option to use your local IIS server.

Update:

If you re using a "Web Site" project instead of "Web Application," the setting is located in the properties window of the project instead of the properties dialog. Note the "Use dynamic ports" option here: enter image description here

问题回答

How does your web application look on the Solution explorer - does it show

<drive>:<some directory>

or does it show the name of your web application with no path. or does it show http:/// <something>

在1起案件中,应当能够看到财产。 但是,你们为其他人赢得了胜利。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签