I'm pretty sure I did this to myself. I just updated my WebMatrix files and had issues publishing to Winhost. I'll try to be as to-the-point as possible. After updating my WebMatrix files, I ran into an error on my live server. This error was a database connection error because of the new formatting for connecting to a database. I didn't figure this out at first, and thought it was my web.config file. I Uncommented a section of code that I /thought/ I had put there in order to fix a problem similar to this, and then I published. Now I can't publish anything from this site (the bad code has been re commented), and this error is produced: "Unable to publish site because of missing database connection strings in Publish Settings." I really broke something...but I'm not sure what. Here is the code that I ran, which I assume to be the template default: Code: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.4.0" /> <add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </DbProviderFactories> </system.data> <system.web> <compilation targetFramework="4.0" /> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" /> </system.web> </configuration>
Publishing your site/code has nothing to do with the Winhost Control Panel. Try again after a bit. You might be running into a network timeout issue.
I hope so. The timing just really made it seem my fault. Thanks for the reply. If it comes back on I'll update or remove the post. EDIT. Okay, so the site has fixed itself, but I still can't publish.
What's the error message you're getting when publishing? You're also welcome to open a support ticket so that we can take a look at it.
The only message I get is at the bottom right after I click publish, it just says "Unable to publish site because of missing database strings in Publish Settings." It doesn't offer any other information, and my actual settings appear fine. When I click Validate Connection under settings, I get this message "The remote server connection succeeded, but Microsoft WebMatrix cannot access the database." I will open a support ticket after I try to reinstall the program. Thank you for the reply.
So I'm thinking it must be a problem with my web.config file, the only error I get it when I 'Validate Connection' in Publish settings - "The remote server connection succeeded, but Microsoft WebMatrix cannot access databases." Here is my config file, maybe someone can look through it and see if anything is off? Code: <?xml version="1.0" encoding="UTF-8"?> <configuration> <connectionStrings> <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="Data Source=tcp:s07.Winhost.com;Initial Catalog=****;User ID=****;Password=****;Integrated Security=****;" providerName="System.Data.SqlClient" /> </connectionStrings> <system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.4.0" /> <add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </DbProviderFactories> </system.data> <appSettings> <add key="enableSimpleMembership" value="true" /> </appSettings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <!-- <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> --> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> </assemblies> </compilation> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" /> </system.web> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> <system.webServer> <handlers> <remove name="UrlRoutingHandler" /> </handlers> </system.webServer> </configuration>
So I managed to get the publishing to work by deleting Winhostdefault.htm from the server via ftp. I have NO idea why this worked. Either way, now my site wont load because the connection string is incorrect (This is really odd, because i never changed the connection string). Here is the connectionstring i have, let me know what you think: <add name="LocalSqlServer" connectionString="Data Source=tcp:s07.Winhost.com;Initial Catalog=DB_43740_specri;User ID=DB_43740_specri_user;Password=****;Integrated Security=False; providerName="System.Data.SqlClient" /> I really need some advice here. The **** for the password is intentional....
Well. I've found a weird issue. If I have this as a connection string, the site will work but I cannot use WebMatrix to publish: <add name="LocalSqlServer" connectionString="Data Source=tcp:s07.Winhost.com;Initial Catalog=DB_43740_specri;User ID=DB_43740_specri_user;Password=****;Integrated Security=False;" providerName="System.Data.SqlClient" /> If, however, I remove the " after False; , I CAN publish from WebMatrix, but the site will fail: <add name="LocalSqlServer" connectionString="Data Source=tcp:s07.Winhost.com;Initial Catalog=DB_43740_specri;User ID=DB_43740_specri_user;Password=****;Integrated Security=False; providerName="System.Data.SqlClient" /> This seems like such a specific bug that there is a chance I'm the only one dealing with the problem. I don't see anyway to delete this thread...
The first connection string is correct, however, I'm not sure why it's failing in Web Matrix. We might need to see your publishing settings.