Sunday, May 31, 2009

Known Issues, Resolutions and Work-arounds for VS 10 Web 1-Click Publish

There are certain known issues and workarounds which you may or may not encounter while using VS 2010 Web 1-Click Publish but I have still posted them here in case you face any of those and want to debug your deployment problems…

  • If you receive 502- Bad Gateway error then go to Internet Explorer –> Connections –> LAN Settings –> and uncheck the “Automatically detect proxy settings” and after that you should be good to go…
  • At times within Intranet environments if ISA Server or alike is not running then you may get errors like “VsMsdeploy failed.(Request to remote agent URL 'https://myWebServerName:8172/msdeploy.axd?site=myWebSite’ failed.) Error Details:Unable to connect to the remote server. OR The remote name could not be resolved… “   The resolution for the above issue is to enable the ISA server and re-run you deployment…
  • If you get an error about your .mdf file being used by some other process then the resolution for this issue is to right click on your MDF file under App_Data folder and click “Detach”…  The other typical culprit which holds an handle to the .mdf file is the Server Explorer… You can try to close the server explorer and try publishing again too… Finally, I hate to say it but if nothing works then you can restart VS…  This is a known bug and will be resolved in the future releases of Visual Studio 2010…!!
    •  

41 comments:

KeepingItSimple said...

Error 1
VsMsdeploy failed. (Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.)

Any thoughts why this could be ?

Vishal R Joshi said...

Hi KeepingItSimple,
This sometimes happen due to inability to connect to the destination before timeout occurs... We are trying to address this in the subsequent releases... Although to confirm that this is the issue could you possible help out by going to Tools--> Options --> Projects and Solutions --> Build and Run and change both the MsBuild verbosity to "Diagnostic"... Then when you try to republish your output window will have way more information... Feel free to send in that information to Vishal.Joshi@Microsoft.com and we will try to analyze it...
Also if possible can you let us know what was the server you were publishing to? i.e. was it one of the discount asp or OrcsWeb trial hosting servers?
Thanks
Vishal

Anonymous said...

Hi I'm Ed Mariano,

Could you help me on the following error which I encounter during the publishing process

Error 1 VsMsdeploy failed.(Request to remote agent URL 'https://msdeploylab.discountasp.net:8172/msdeploy.axd?site=user2754.msdeploylab.discountasp.net' failed.) Error Details:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.. 0 0 IssueTracking

Vishal R Joshi said...

I believe you might not have checked the box "allow untrusted connection" as these are trial accounts DiscountASP does not have authenticated certificates hence you might see the failure... Hope this helps...

Anonymous said...

From Ed Mariano,

To get rid of Error 1 VsMsdeploy failed: Select the checkbox for Allow untrusted certificate in the Publish dialog box

Vishal R Joshi said...

Glad that resolved your issue Ed...

Anonymous said...

from Ed Mariano,
Successfully deploy web application but when I open the website: http://user2754.msdeploylab.discountasp.net/default.aspx I got the following error. Please help:
Unrecognized attribute 'targetFrameworkMoniker'. Note that attribute names are case-sensitive.

Source Error:


Line 27:
Line 28: system.web
Line 29: compilation targetFrameworkMoniker=".NETFramework,Version=v4.0"

Anonymous said...

from Ed Mariano,

Already resolved error: targetFrameworkMoniker; I recall when choosing which type of account: 3.4 or 4.0 platform I chose 3.5 so I go to Project Properties and change 4.0 plafform to 3.5 and it works. Thanks for future prompt responses.

Vishal R Joshi said...

Ed, did you try to deploy your database by configuring it in the Deploy SQL tab? How was your experience overall, what do you think needs to be improved?

Anonymous said...

Ed Mariano said:

Yeah Vishal, I have not tried to deploy my database because the database already resides on the server.

However I have encountered one issue in vs2010 beta 1 stated below:

I created an code file (RolloverButtons.cs) and initially put in the root dir and then later decide to move it to App_Code folder and when I try to test it in a webpage it does not work and the system displays the error below:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'ClubSite.RolloverButton' exists in both 'c:\Users\ed\AppData\Local\Temp\Temporary ASP.NET Files\root\c6e19c33\b6d20519\App_Code.ttwhutyl.dll' and 'c:\Users\ed\AppData\Local\Temp\Temporary ASP.NET Files\root\c6e19c33\b6d20519\assembly\dl3\3ee62bd3\0beb3196_9206ca01\IssueTracking3.DLL'

Source Error:



Line 1578:
Line 1579: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 1580: private global::ClubSite.RolloverButton @__BuildControl__control32() {
Line 1581: global::ClubSite.RolloverButton @__ctrl;

Solution: I make a new project and copy all the files and folders from old projects. Is there another solution? Thanks in advance.

Vishal R Joshi said...

If you can right click on your project and see a "package" command then you are using a web application project (WAP)... App_Code folder is not permitted in WAPs, can you confirm whether you are using a WAP or a Web Site project?

Anonymous said...

Ed Mariano said:

Yes I am using WAP.

You mean if I need to use App_Code folder I should use Web Site project? What is the difference between the two.

Thanks in advance.

Anonymous said...

Ed Mariano said: I tried creating a website but this time not a WAP. I notice there is no deploy icon. HOw to deploy a website if it's not a WAP? Thanks

Anonymous said...

Ed Mariano said:

If App_Code folder is not allowed in WAP, does it folllow we can't use it in testing this beta version of VS2010 but is available in the final product

Anonymous said...

Ed Mariano said:

I am testing the password recovery of the Login controls, do you have idea on the smtp mail setting in the web.config

Anonymous said...

Ed Mariano said...

The website is tested working locally but when open after successfully deploying it. The error below appears. Is this because of the code file I have in the App_Code folder? Why local testing is ok?

Website:
http://user2754.msdeploylab.discountasp.net/ed_mariano/default.aspx


500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Anonymous said...

Ed Marino said...

Is code file not allowed?

Anonymous said...

Ed Mariano said..

Hi Vishal,

I got a lot of issues when r u coming back?

Vishal R Joshi said...

Hi Ed...
You said >> "You mean if I need to use App_Code folder I should use Web Site project? What is the difference between the two."

App_Code folders work well with Web Sites, they were designed in a way by which ASP.NET compiler can look for loose code files inside them... In WAP the compilation model is different hence you actually do not need App_Code folder... You can create any folder, name it whatever you like (otherthan special "App_" names) and feel free drop code files inside them... Everything should work fine even with it...
-Vishal

Vishal R Joshi said...

You said >> "Do you have idea on the smtp mail setting in the web.config"...

In the solution explorer of your web project there is a small icon whose tooltip reads "ASP.NET Configuration"... The tool can also be invoked from top Menu of VS Project-->ASP.NET Configuration... This launches the ASP.NET Web Administration Tool... Once you launch the tool you can click on "Application" tab in the tool which will allow you to configure the SMTP settings like ServerName, ServerPort, Senders UID/PWD etc...

In order for this to work you will need a configured SMTP mail server which your server admin can provide...
-Vishal

Vishal R Joshi said...

You should look at the first line in your .aspx page which will contain something similar to "@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" CodeBehind="Default.aspx.cs""... If your page contains CodeBehind attribute then you should not have a CodeFile within similar name in App_Code folder... The ASP.NET Compiler will have issues due to that...
To avoid most of these issues you should not create a App_Code folder in WAP projects...
Also if you are using a Class Library project along with WAP then please go to Build --> Configuration Manager and make sure that the platform of your project is not set to x86... It should be set to ANY CPU... This might create some issues as well...
Let me know how it goes...
-Vishal

Vishal R Joshi said...

Also it seems like you are posting to a folder under your main side... In that situation make sure you click "Mark as IIS Application" on destination if you want to have that folder be running as its own Application...
Btw, your site looks running well.. Congrats...

Vishal R Joshi said...

You said>> "I got a lot of issues when r u coming back?"
I am back now...:-)
-Vishal

Anonymous said...

Ed Mariano said:

First, I want to thank you Vishal for your generosity to answer my questions gratis.

Second, the reason why the website is running weel is becase I remove the code file. Now I am going to try again bringing back to code file in a folder I will create which name should not be App_Code then I will tell you the result

Vishal R Joshi said...

Can you please suggest what your code file is doing and why do you need it in App_Code folder...? Perhaps that can help troubleshoot much faster...
-Vishal

Anonymous said...

If your familiar with the Clubsite website, it's the RolloverButtons.cs. There is an availble template / starter kit for website. What I am doing is convertin the website into web application. By the way I put the RolloverButton.cs in the root folder and it is still not working. If you don't have access to the starter kit I will send you. Please let me know.

Anonymous said...

Ed Mariano said:

That RolloverButton.cs is mine. By the way how will I have that automatic Ed Mariano said.. so I won't retype everytime?

Vishal R Joshi said...

You can sign in instead of keeping Anonymous so that next time it will remain so...

Please send the starter kit to Vishal.Joshi@Microsoft.com with your code will try to have a look... Although I am still out of station so it might be delayed... What are you doing to change the web site to a web application...?

Unknown said...

I sent you the project folder via email. By the way I am a teacher and I am developing sequence diagram for each of the use cases like login, register. These diagrams help teach easily the logic of OOP and the same time learning this new technology

Vishal R Joshi said...

Do you know that with VS 2010 there is a sequence diagram feature available already?

Unknown said...

Really this will be of great help. How will Igo there?

Unknown said...

The sequence diagram is amazing. Thanks

Unknown said...

It took me 3 hours to draw that sequence diagran now it only takes a minute.

Unknown said...

Hi Vishal,

I already sent you the project folder with issue in App_Code folder

Unknown said...

Dear Vishal,

Got the below error when deploying Silvelight application?

Error 1 VsMsdeploy failed.(Request to remote agent URL 'https://msdeploylab.discountasp.net:8172/msdeploy.axd?site=user2754.msdeploylab.discountasp.net' failed.) Error Details:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.. 0 0 DiggSample_WebServer

Unknown said...

Resolve already the recent error about ssl/tls

Laith said...

when I am trying to upload am getting this error, any idea why?



The "VSMSDeploy" task failed unexpectedly.
System.TypeLoadException: Could not load type 'Microsoft.Web.Deployment.DeploymentException' from assembly 'Microsoft.Web.Deployment, Version=7.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult

Vishal R Joshi said...

Hi Laith,
Plz can you plz go to Tools--> Options --> Projects and Solutions --> Build and Run and change both the MsBuild verbosity to "Diagnostic"... If you can then share the output window result to me at Vishal.Joshi@Microsoft.com then it will really help me debug the scenario...
Thanks
Vishal

Sabawoon said...

May peace be on you Vishal!

I'm having the same problem what Laith is having, if he/she has send you the output, please help me out about it.

q_sabawoon@hotmail.com

Thanks,

Sabawoon

Lerman said...

I am getting an error stating the following when I try to do a web deploy:

"An error occurred when the request was processed on the remote computer. The trust relationship between this workstation and the primary domain failed"

As a note, allow untrusted cert is checked.

Thanks in advance

Vishal R Joshi said...

Hi Lerman,
Owais & Ben from my team just suggested that you might be getting this trust issue even when you try to login on the remote system too.

Can you try to login to the remote system and logoff and log back in. That should clear this issue. Also take a look at http://support.microsoft.com/kb/162797, which might help...
Thanks
Vishal