Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to publish website from Visual studio 2010

We have a an ASP NET MVC website solution which only one out of three devs on the team is able to publish to the live server. When I, and another colleague, attempt to publish the site from VS 2010, the output window will display an error:

Unable to create the Web site '\blah'. The path '\blah' does not exist or you do not have access. The specified path is invalid.

This points to a logon issue which my account, but the developer who can publish the site is a member of all the same user groups as me. As a long-shot, we gave Everyone full access to the folder, but this did not resolve the problem.

Can anyone suggest a more detailed way to try and figure out why we cannot publish the site? There must be a permission set somewhere that is allowing my colleague to publish the site from Visual Studio.

like image 687
Jason Evans Avatar asked Sep 05 '25 03:09

Jason Evans


2 Answers

I had this problem and racked my brain trying to resolve it so I wouldn't have to copy the publish files to a remote server manually. I spent a great deal of time actively trying to get this to work.

Here's how I solved the problem: I went to File>Open in Visual Studio 2010 Express and navigated to the remote server (\\255.255.255.255\folder1\folder2\folder3 and so on). Right away I was challenged for a User Name an Password. I entered the credentials for the REMOTE server, checked the box to 'Remember my credentials'. I immediately tried to publish and voilá - it worked like a charm.

I hope this saves a lot of people a lot of time.

like image 199
Alet Avatar answered Sep 07 '25 21:09

Alet


I had this issue - certain members of our team were able to publish directly from VS2010, whereas for some reason I was always getting permission denied errors, even though we were all able to connect to the server we were trying to deploy to. I fixed it in the following way:

Go to "Server Explorer".

Right click "Servers" and go to "Add server..."

Type in the name of the server you are trying to connect to, and then click on "Connect using a different user name..." - put the credentials for logging into the server in here.

Click OK and wait for it to add the server.

Now try and publish to that server and it should be ok...

Not sure why I needed to do this and others were able to deploy without adding the server in this way... remains unexplained.

According to the comments below:

  • You may need to restart Visual Studio in order for this to take effect.
  • This should also work for newer versions of Visual Studio
like image 26
soupy1976 Avatar answered Sep 07 '25 21:09

soupy1976