0

Situation:

  1. I have configured my web.config and web.release.config file , in the below.

  2. I have configured Packet and Publish SQL but it is testing wrongly (I use Access but not SQL , all the web form are connected to Access successfully.)

  3. When I Publish to web-deployment in the Internet , The error messages happen in the below. ( Hosting provider ,using own PC for tourist accessing to my Webpage)

Web.config

<configuration>
<connectionStrings>
<add name="DBCS"
 connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\sim\Desktop\Web.accdb"
 providerName="System.Data.SqlClient" />
</connectionStrings>)

web.release.config

 <connectionStrings>
   <add name="DBCS"
    connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data      Source=C:\Users\sim\Desktop\Web.accdb" xdt:Transform="SetAttributes"            xdt:Locator="Match(name)"/>
</connectionStrings>

Error message:

Error 1 Web deployment task failed.(Object of type 'dbFullSql' and path 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\sim\Desktop\Web.accdb' cannot be created.) Object of type 'dbFullSql' and path 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\sim\Desktop\Web.accdb' cannot be created. The value 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\sim\Desktop\Web.accdb' is not a valid connection string or an absolute path. Keyword not supported: 'provider'. 0 0 FYP


Himanshu
  • 4,327
  • 16
  • 31
  • 39
Kindess
  • 49
  • 6

1 Answers1

0

I could not comment, but I think that the 'Source' path is invalid on the destination server. Maybe try to put the db in your App_Data and change your source to Source=|DataDirectory|\Web.accdb.

With this you would not need the transform for your connection string. I also noticed that you do not change any with the transform in the release config and it it also missing the providerName attribute.

You can do a local file system publish, or preview the transform just to confirm that the transform is working correctly.

Davy Jones
  • 673
  • 7
  • 8
  • Connectionstring in web.releases.config is different from web.config? i have though of local file system, but i need to open the web and database in outside home. – Kindess Apr 23 '15 at 00:08
  • Source path is invalid on the destination server how to change the source to Source=|DataDirectory|\Web.accdb ... sorry i am so new – Kindess Apr 23 '15 at 00:49
  • In you project root you should have App_Data folder. If not, right click project > Add > Add ASP.NET Folder > App_Data. Then move your Access db to that folder. Then change your ConnectionString as I have shown you: `` – Davy Jones Apr 24 '15 at 09:07