January 16, 2009 at 8:05 am
I use Visual Web Developer Express 2008. I understand it uses SQL Server Express.
As I understand the situation, SQL Server Express works on the host only if the host is a dedicated host. I'm not sure that is the correct technical expression. But that would require a lot of servers and so the host server does multiple applications at the same time so the company doesn't need anywhere near the number of servers if they had a server, one for each client.
Nevertheless, there seems to be some command I can write somewhere that will "fool" the server and let my SQL Server Express database work on their multiple client servers.
Since my connection with the host server is only with the FTP transfer process, I have to make the change in one of the files I transfer to the host. At least, that is the way it appears to me. And the only file where the change could be made is in the web.config file.
Except for one thing. Apparently with the command Website/ASP.net Configuration I can make changes that somehow or other are additional changes I should make, particularly if I am interested in the Registration/login/roles/authentication/etc. process. And at this point this is the reason why I need the SQL Server process to work. I can't do any login, etc., without it.
Besides telling me to go read something, can anybody tell me what the actual problem is, give me a description of what I am going when I do it and then tell me what it is I have to do to correct this problem? Am I the only person using VWD who has this problem? How do all the other people solve it?
Mark H.
January 17, 2009 at 1:33 pm
Did you develop the site on your local box and have SQL Express running on your local box?
Do you have this line in your web.config file?
authentication mode="Forms"
Do you have this in your web.config file?
identity impersonate="true"
Do you have a connectionString for the membership database in your web.config file? If so, what is the connectionString?
When you upload your site to a remote host, the membership database needs to be attached to host's SQL Server. Most likely you'll need to change your connectionString or add a new connectionString to point to the new membership database location.
The first thing I would do is contact the host and request to get the database attached to SQL if this hasn't been done already. And also see if the host will provide you with a connectionString if you don't know how to write it.
January 20, 2009 at 11:21 am
Haven't heard the name Grasshopper for many years.
Yes,I developed the site on my local box and it works fine with localhost. SQL Express is running on my local box.
Yes, I have authentication mode="Forms". Here is the way it looks.
<forms
cookieless="UseCookies"
defaultUrl="~/Default.aspx"
domain=""
enableCrossAppRedirects="false"
loginUrl="~/Login.aspx"
name=".ASPXAUTH"
path="/"
protection="All"
requireSSL="false"
slidingExpiration="true"
timeout="30"
/>
No,I don't have identity impersonate="true"
As for connection strings, I have
<add name="LocalSqlDBServer "
connectionString="Data Source=DBServerName;Integrated Security=false;
Initial Catalog=DBName;User ID=DBLogin;
Password=DBPassword "
providerName="System.Data.SqlClient"/>
<!--
-->
In the quest for making the code work I replaced some of the connectionString code. I kept it as a comment for possible future use.
Aside from a proper noun needed to identify the connection, does any of that connection string stuff make sense?
You seem to be concentrating on web.config. I am not surprised. I take it doing something with IIS settings or Website/ASP.Net Configuration have nothing to do with producing a connection.
I will send an email to the web host and see what they have to say about about connecting. Although they haven't been very helpfull.
Many thanks
mhh12
January 21, 2009 at 4:41 pm
Where did you get the name of the LocalSqlServer?
add name="LocalSqlDBServer"
Should that be "add name=LocalSqlServer"?
Here's a sample string to connect to a remote host using .Net Framework 2.0
<connectionStrings>
<remove name ="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=someserver.somehost.com;
Integrated Security=False;Initial Catalog=mydatabase;User ID=myuserid;
Password=mypassword" ProviderName="System.Data.SqlClient"/>
</connectionStrings>
You might want to consider encrypting your connectionStrings.
January 24, 2009 at 8:19 am
I want to thank you for your responses. If all responses were this precise, we wouldn't have the long threads which end up getting nowhere.
For the moment, I am going off the track of trying to get code to work and I am going to see what I can learn about what goes in web.config and how one knows what belongs in it. These fishing expeditions to get an answer are ridiculous.
Again, thank you. I will be back.
Mark H.
January 24, 2009 at 2:53 pm
Did you ever get it to work? Are you able to log in?
Did you upload your App_Data folder to the remote site?
Have you contacted the host and asked them to attach your membership database or create a new membership database for you on their server?
The way it usually works is that after you upload your site to the remote server, the host will attach your membership database to their version of SQL Server and then provide you with the info you need to build a connectionString in web.config. Or the host will provide you a connectionString to add to web.config.
This has to be done first or you'll never be able to log in. If you haven't communicated with your host about what steps need to be taken to get you up and running, do that now.
January 27, 2009 at 7:42 am
Thanks for your interest and comments.
I have cancelled my subscription to the web host. They have a comment they don't support SQL Server Express anymore.
I am looking into getting SQL Server 2005 Standard, which, apparently, all web hosts support. I can't believe so many small businesses which collect info from their customers pay at least $1500.00 for a standard copy. The MSFT description of what the Standard MSFT actual does is worthless. It doesn't say in simple English, yes, you can develop a database on your own machine and then send it over to your host SQL Server and any number of people on the web can contribute and view information in the database. They talk about client access licenses. Who's the client. People working for me or people viewing the site on the web? Or neither.
I have bought a copy of Visual Studio 2008, but it uses SQL Server 2005 Express which is already in my machine. So now I have to get a standard SQL Server to replace the express version. Then, presumeably, I will have programs which host servers will recognize with less ambiguous information.
I have found out that while I need the correct statements in Web.config, I also need the correct statements in my code behind pages which display and collect data to match up with the web.config statements.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply