Skip to content

WebMatrix - Difficulty in deploying website

ashish sadasing

Asked Mar 22, 2016, 1:34 AM EDT2 answers
Share
LinkedInX
Hello everyone,
 
I am having some trouble in deploying a website. I have used Microsoft WebMatrix to create the site. 
It is developed in asp.net c# webpages (Razor 3 syntax).
 
Whenever i am trying to deploy it using webmatrix publish option. I have the error below :
 
Unable to start publishing.
Web Deploy site definition is not accessible.
 
However, in my web.config, i have a series of connection string. When i comment the <connectionStrings>, the publish option work correctly.
 
In my index.cshtml page, i am looping through these connection string, so they are very important. 
  1. string[] clients = {"test1", "test2", "test3"};  
  2. foreach (var client in clients) {  
  3.   
  4. //Database connection  
  5.   
  6. var db = Database.Open(client);  
 
 My questions are :
 
1. Is there another way of ecternalising the connection string so that the publish option in webmatrix works?
 
2. Is there another way by which i can deploy the site? If Yes, how can i do it step by step.
 
I really hope you can help me in this situation. Thank you in advance. 

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
    https://forums.iis.net/t/1191835.aspx
    0
  • 0
    I have 3 connection string stored in my web.config. All of them are active and their corresponding query works as well. The database is IBM db2. Besides,the file "PublishProfile.xml" is not available there. The only file that exist in this folder is : site.preferences Is there any other way ?
    0