user3601704
user3601704

Reputation: 763

error when publishing application to a remote windows server

I need to publish an application built by C# on VS 2010 (.NET 4.0) to a Windows server 2008 R2.

I just followed the instructions ("publish to a file share or path") here:

https://msdn.microsoft.com/en-us/library/31kztyey.aspx

But I receive an error:

Error 158 :  VS 2010 publish application Failed to connect to "\\myServer\e$\myPath\" with the following error: 

Unable to create the Web site "\\myServer\e$\myPath\"

The path does not exist or you do not have access. The specified path is invalid. 

I can log in remotely to the "myServer". So why do I have an access problem here ?

Here "e$" is E drive on the server.

Upvotes: 0

Views: 1870

Answers (1)

DavidG
DavidG

Reputation: 119017

When you access the path on another server using the administrative share (i.e. e$), you need to have the correct level of permissions or it will not work. This is shown by browsing to that location in Windows Explorer - it pops up a login prompt. After you enter your details, your session now caches those credentials and the publishing wizard will also work.

Users shouldn't be accessing that application using the share path you use. Instead, the web server on that box (IIS I would assume) should have it's own binding set up. For example, you may be able to give your users an address something like this:

http://myServer/

Upvotes: 1

Related Questions