Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 24th, 2007, 11:46 PM
Authorized User
 
Join Date: Apr 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Third party servers and mdf files

I am currently reading the book called Beginning ASP.NET 2.0 with C#. I am doing the exercises and this works on my machine. However, I am planning to put ASP code on a third party server, godaddy.com to be exact. This does not work so well, I often get>>

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Godaddy claims that even though the account is ASP 2.0 enabled and ASP.NET is working, they do not allow mdf files on their shared servers for security reasons, and that this is the problem.

First it is a little hard to believe this since mdf files are used for so many things in ASP.NET (for example most exercises result in one or two mdf files).

So my two questions are>>

(1) Does anyone with a little bit more expeirence beleive this could be true? That the nations most known web hosting company will not allow mdf files? Could it really be something else?

(2) Could I convert mdf files into pure code or an sql data base?

Any thoughts on this troubling situation are welcome

Thomas Wikman

 
Old April 25th, 2007, 07:00 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I would suspect that the primary reason for this is that they want to sell you a more expensive plan that has database service. I would doubt that there is a real security issue for not allowing mdf files in your account. I imagine that the reason is primarily marketing and sales driven. After all, they are a business.

-Peter
 
Old April 25th, 2007, 07:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

they want to sell you a better plan... Mdf files are SQL2005 databases.. they are not just plain files, and since in a web enviroment they need to install a full SQL 2005 that they have bought from microsoft is logical that they want to charge you if you want to use them...
and you can convert them to anything you want, just use SQL Server Management Studio Express to open it and export the schema as an SQL...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
 
Old April 26th, 2007, 12:40 AM
Authorized User
 
Join Date: Apr 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your help. As you can see I do not know much about this, but from you what you both were saying I realized that what they said could not be correct and that I need to have SQL 2005 installed on the server. I searched the godaddy.com web site and voila; they provide a web based application for installing that (without buying a better option). So after using this application the error changed to:

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'

Which means it still does not work, but I got further, and it shows I am allowed to have SQL. So they were trying to pull my leg. I can probably get this working without buying the dedicated server option. Before I post any questions regarding SQL server I will do some reading on the topic and try doing it myself a few times.

So in conclusion thanks for your help!

 
Old April 26th, 2007, 07:55 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Thomas, it's very likely they are not pulling your leg. Well, they are kind of. There isn't necessarily a "security" reason for not allowing the raw database files in your hosting account. But there are very likely legitimate reliability reasons. By requiring you to use the tools to configure and manage a SQL Server database, they can control where the database lives and how it's managed. They can implement failover and backup systems that way. It's great if they allow you to set up a DB without paying more. They probably use the ambiguous "it's for security reasons" because most people won't question it and it's far simpler than explaining the more accurate but technical reasons.

Of course, another very legitimate reason for not allowing mdf files is that a big web host like that has dedicated database servers versus running SQL2005 Express which dynamically attaches to your MDF. Express is great in a development environment, but it's not intended (nor licensed) for enterprise/production environments. So your mdf files would be of no use anyway.

-Peter
 
Old April 29th, 2007, 09:42 PM
Authorized User
 
Join Date: Apr 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes Peter it turned out you were right. Godaddy does not support mdf files. What is worse I cannot import the data from mdf to the SQL data base because their tool does not support this action either. I could create an SQL data base but could not get my information from the mdf to the SQL data base because that operation was not allowed either. CSV is allowed, however.

So the only way around my problem is not to generate an mdf file to begin with. However, is it not a little wrong to claim (1) that you support ASP.NET 2.0 (2) Support Visual Web Developer generated web sites, if .mdf files are useless on your server?

I will ask another question regarding this but as a new topic because it is a different question.

 
Old April 30th, 2007, 05:11 PM
Authorized User
 
Join Date: Apr 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes you are right, now I finally got a straight informative answer from godaddy and you are right. MDF/LDF represent a security hole.

It is posted below

Dear Sir/Madam,

Thank you for contacting Online Support. It seems as though you are confusing support for SQl Express (local MDF file) with ASP.NET 2.0. Our shared hosting environment is ASP.NET 2.0 compatible. We support all of the required run times and standard controls.

However, we do not support MS SQL Express. This is a scaled down, free, version of Microsoft SQL Server that allows developers to access MDF files from a local drive. As an alternative, we provide at least 1 full MS SQL database with each windows shared hosting plan. This provides all of the same database capabilities as SQL express running from a local server plus a host of more advanced features. The tradeoff is that it runs on a remote, dedicated DB server.


1. The problem is that we do not support SQL Express on the shared hosting box for security reasons. To offset this, we provide at least one full MS SQL DB with each plan. Our shared hosting servers are fully ASP.NET 2.0 compliant.
2. We do not support uploading an MDF file for security reasons. This introduces a security hole by which hackers can gain access to the database server. This is per Microsoft's recommendation. The same is true for importing .BAK files.
3. To remedy this situation, you must move replace your local database with one of his accounts MSSQL databases.
4. We provide an automated mechanism to create the ASP.NET schema tables in his hosted DB. Through the hosting control panel, there is a check box to apply the asp schema. Doing this will add all of the tables, procedures, etc that he is expecting to use in his local MDF. Using this automated process will prevent the you from having to manually recreate the required database objects.
5. If the you insists on using local mdf files and SQL express, you will need to move to a ded/vded box where you can decide what software to install.


 
Old May 1st, 2007, 07:47 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Thomas,

If GoDaddy allows you to connect to the hosted database from the internet (I have seen web hosts that allow this) then you could try a tool like Red-Gates SQL Compare and SQL Data Compare. These tools will connect to SQL 2005 (or 2000) databases and allow you to compare and synchronize schema and data. It's very handy for just the type of thing you are doing. They have a fully capable trial for 14 days. So you can at least get your self up and running.

-Peter
 
Old May 1st, 2007, 10:18 PM
Authorized User
 
Join Date: Apr 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Peter,

Actually they do. They provide a web based SQL data base management tool which I used to create an empty database. I also successfully connected to it with my connection string. Further, this tool allows you to import the data from other databases (on your local development machine). All good! The trick is you cannot start out with a mdf/ldf database on your local development machine, the tool does not read such a file.

So my quest is to get either a sql or a CSV file on my local development machine instead of the worthless mdf/ldf files. Is there a way of converting mdf/ldf to sql, or is there a way of using Visual Web Devoloper so that it generates sql/CSV instead of mdf/ldf.

So if you or someone knows a mdf/ldf --> sql/CVS trick (local development machine) That would be wonderful!

 
Old May 2nd, 2007, 06:47 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

So you tried SQL Compare?

It looks like you can connect that to a running instance of SQL Express. So you should be able to connect SQL Compare and Data Compare to your SQL Express instance and to the GoDaddy connection and move the data over.

Here's a thread I found discussing a few pitfalls.

http://www.red-gate.com/messageboard...191cf3909c8260

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are the .mdf and .ldf files? mike72 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 March 18th, 2008 11:11 AM
I don't want VWD to generate mdf files, how? ThomasWikman BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 12 May 21st, 2007 01:39 AM
.mdf files no good papakev123 BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 4 April 3rd, 2007 02:35 PM
how to prepare database with .ldf and .mdf files beetle_jaipur SQL Server 2000 2 March 8th, 2007 11:54 PM
SQL 2000 MDF files fchaffin BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 July 5th, 2006 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.