I am using Windows 8, VS 2012 Express for Web, and Sql Server 2012 Express. I cannot pub;ishmy Web Application prooject using Web Deploy. My application works fine using the Development Server.
In the “Publish Web” dialog pane, with Preview menu item selected, under Databases Section I have two databases that can be previewed. These are
- Aspnetdb, with connectionstring = Data Source=(LocalDB)\v11.0; AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=True;Connect Timeout=30
- WpcEventsSql with connectionstring = Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\ WpcEventsSQL.mdf;Integrated Security=True;Connect Timeout=30
When I click “Preview database” for aspnetdb I get the following error:
If I click the Publish button with both databases displayed on the Publish Web dialog, I get 2 warnings and an error, as shown here:
Warning 1 The specified dacpac file exists and will be overwritten
Warning 2 The specified dacpac file exists and will be overwritten
Error 3 Web deployment task failed. (Failed to create type ‘Microsoft.SqlServer.Dac.DacServices’. Learn more at:
http://go Microsoft.com/fwlink/?Linkid=221672#Error_Exception_While_Creating_Object.)
Checking the web site indicated with all the above error messages does not help (the Error_Exception_While_Creating_Object is not on that page)
It sounds like a package may not have been installed correctly or may have gotten uninstalled accidentally. Do you see the library C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\Microsoft.SqlServer.Dac.dll? Could you try going into Add & Remove
Programs in Control Panel and doing a repair on Visual Studio Express for Web to see if that resolves this?
It looks like I had a problem with setting up Publishing. It is apparent to me I did not understand how to manage Sql erver Express and LocalDB in my connectionstrings.
I am having the same issue. I am working with VS Pro 2012 and am publishing to an SBS 2011 server.
I have the dac.dll file on my desktop. I assume that is where you mean.
My settings are "Use this connection string at runtime in both Application Services and aspnetdbEntitites.
In ApplicationServices, I don't have Update database checked
In aspnetdbEntities, I do have Update database checked.
AspnetdbEntities is the only SQL database I have. The other databases are access accdb files.
In the final frame, I can click on Database Preview: aspnetdbEntitities and it tells me Web Deployment task failed. (Failed to create type 'Microsot.SQLServer.Dac.DacServices". Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.) This is the same error I get in the Error List when I try to deploy. The link does ot address this error.
aspjack
0 Points
5 Posts
Publish Web - Cannot Create Object Error
Dec 11, 2012 09:29 PM|LINK
I am using Windows 8, VS 2012 Express for Web, and Sql Server 2012 Express. I cannot pub;ishmy Web Application prooject using Web Deploy. My application works fine using the Development Server.
In the “Publish Web” dialog pane, with Preview menu item selected, under Databases Section I have two databases that can be previewed. These are
- Aspnetdb, with connectionstring = Data Source=(LocalDB)\v11.0; AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=True;Connect Timeout=30
- WpcEventsSql with connectionstring = Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\ WpcEventsSQL.mdf;Integrated Security=True;Connect Timeout=30
When I click “Preview database” for aspnetdb I get the following error:
“Web deployment task failed. (Failed to create type 'Microsot.SqlServer.Dac.DacServices'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
When I click “Preview database” for WpcEventsSql I get the following (same) error:
Web deployment task failed. (Failed to create type 'Microsot.SqlServer.Dac.DacServices'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
If I click the Publish button with both databases displayed on the Publish Web dialog, I get 2 warnings and an error, as shown here:
Warning 1 The specified dacpac file exists and will be overwritten
Warning 2 The specified dacpac file exists and will be overwritten
Error 3 Web deployment task failed. (Failed to create type ‘Microsoft.SqlServer.Dac.DacServices’. Learn more at: http://go Microsoft.com/fwlink/?Linkid=221672#Error_Exception_While_Creating_Object.)
Checking the web site indicated with all the above error messages does not help (the Error_Exception_While_Creating_Object is not on that page)
cts-mgraham
Contributor
3318 Points
642 Posts
Microsoft
Re: Publish Web - Cannot Create Object Error
Dec 17, 2012 11:25 AM|LINK
As of right now, it doesn't look like WebDeploy has support for DACPAC. I'm looking further into this and will reply again.
johnwen
Member
14 Points
2 Posts
Re: Publish Web - Cannot Create Object Error
Dec 18, 2012 07:32 PM|LINK
It sounds like a package may not have been installed correctly or may have gotten uninstalled accidentally. Do you see the library C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\Microsoft.SqlServer.Dac.dll? Could you try going into Add & Remove Programs in Control Panel and doing a repair on Visual Studio Express for Web to see if that resolves this?
aspjack
0 Points
5 Posts
Re: Publish Web - Cannot Create Object Error
Dec 19, 2012 10:30 PM|LINK
It looks like I had a problem with setting up Publishing. It is apparent to me I did not understand how to manage Sql erver Express and LocalDB in my connectionstrings.
I finally "stumbled" upon the following:
In Web.config I now have :
<connectionStrings>
<!--add name="WpcConnectionString" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename="C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS2012\MSSQL\DATA\Wpc_Data.mdf";Integrated Security=True;Connect Timeout=30"
providerName="System.Data.SqlClient" />-->
<add name="Wpc1ConnectionString" connectionString="Data Source=.\SQLEXPRESS2012;AttachDbFilename="C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS2012\MSSQL\DATA\Wpc_Data1.mdf";Integrated Security=True;Connect Timeout=30"
providerName="System.Data.SqlClient" />
</connectionStrings>
Note I am showing the first connection string Wpcconnection string even though it is remarked out in order to show the before and after.
I replaced that with Wpc1connection string which is working.
In my .pubxml file I now have the following (do to the many changes I meade I lost my initial (incorrect) entries:
<
<Objects xmlns="">
<ObjectGroup Name="Wpc1ConnectionString" Order="3" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=.\SQLEXPRESS2012;AttachDbFilename="C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS2012\MSSQL\DATA\Wpc_Data1.mdf";Integrated Security=True;Connect Timeout=30" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\Wpc1ConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=.\SQLEXPRESS2012;AttachDbFilename="C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS2012\MSSQL\DATA\Wpc_Data1.mdf";Integrated Security=True;Connect Timeout=30" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
So, clearly programmer error than I somehow managed to correct. Now I have to go back and study to understand what is happening.
Thanks for the responses
jjobcorp
Member
9 Points
27 Posts
Re: Publish Web - Cannot Create Object Error
Jan 17, 2013 08:03 PM|LINK
I am having exactly the same error. Just to be sure we are on the same page, could I ask you some questions, please?
1. Is this the web.config file on the publishing machine or on the server to which it is published?
2. I don't have any wpcconnectionstring presenlty. Do you know what this is? Do you have anything unusual or should it work on my machine?
3. It doesn't show anything crossed out on the web site. Are you saying the Wpc1ConnectionString is the correct code?
4. Where do you find the pubxml file?
5. Was this publishing to the server? Does the <Destination Path="" /> put the program in the inetpub/wwwroot folder on the server?
6. Did this move the login file aspnetdb.mdf and did it function properly with outside logins?
jjobcorp
Member
9 Points
27 Posts
Re: Publish Web - Cannot Create Object Error
Mar 09, 2013 04:06 PM|LINK
I am having the same issue. I am working with VS Pro 2012 and am publishing to an SBS 2011 server.
I have the dac.dll file on my desktop. I assume that is where you mean.
My settings are "Use this connection string at runtime in both Application Services and aspnetdbEntitites.
In ApplicationServices, I don't have Update database checked
In aspnetdbEntities, I do have Update database checked.
AspnetdbEntities is the only SQL database I have. The other databases are access accdb files.
In the final frame, I can click on Database Preview: aspnetdbEntitities and it tells me Web Deployment task failed. (Failed to create type 'Microsot.SQLServer.Dac.DacServices". Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.) This is the same error I get in the Error List when I try to deploy. The link does ot address this error.