I'm trying to use one-click web deploy to a shared host. The website loads properly, however links that go to pages looking for the database gives
[Win32Exception (0x80004005): The system cannot find the file specified]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
This SO answer says that:
...the host will need to setup web deploy and provide you with non-admin deploy credentials.
There's a full guide on iis.net. The process will output a .publishsettings file to the desktop, which you can import into Visual Studio's publish dialog.
I'm with MyASP.net, and they are running WS 2012. I just want to make sure the solution is not on my end before I send them on a wild goose chase.
My publish profile is:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://abalter-001-site1.myasp.net/</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<MSDeployServiceURL>https://abalter-001-site1.myasp.net:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>abalter-001-site1</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>ifc\abalter-001</UserName>
<_SavePWD>True</_SavePWD>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="GatorsContext" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbCodeFirst">
<Source Path="DBContext" DbContext="Gators3.Models.GatorsContext, Gators3" Origin="Configuration" />
</Object>
</ObjectGroup>
<ObjectGroup Name="DefaultConnection" Order="2" Enabled="False">
<Destination Path="" />
<Object Type="DbCodeFirst">
<Source Path="DBContext" DbContext="Gators3.Models.ApplicationDbContext, Gators3" Origin="Configuration" />
</Object>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
</PropertyGroup>
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)DefaultConnection-Web.config Connection String" />
<MSDeployParameterValue Include="$(DeployParameterPrefix)GatorsContext-Web.config Connection String" />
</ItemGroup>
</Project>
Web deploy settings from host:
UPDATE I got it working. I wasn't actually entering the connection string for the database server on the host. This information was given to me by the host. When I put it in the web-deploy settings, all was well.