ashish sadasing

ashish sadasing

  • NA
  • 22
  • 10.7k

WebMatrix - Difficulty in deploying website

Mar 22 2016 5:34 AM
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. 
  
 
 

Answers (2)