 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
|
|
|
|
|

May 17th, 2012, 10:31 AM
|
|
Authorized User
|
|
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Publish to Provider using VS2010
Hi Imar,
I posted this to the General Discussion forum over 2 days ago but have had zero responses so I have only posted this here since I know you will at least pick it up and try to give an answer. Are you able to help me:-
Cheers Imar.
Ian Ryder.
Quote:
Hi All,
I am hoping someone may be able to clarify why the .sql file created by the Publish to Provider application in VS2010 keeps getting rejected by my web host import routine.
To explain, I needed to create the ASPNETDB database on my web host and as you would expect, I used the Publish to Provider utility in VS2010 to create a .sql script to accomplish this.
As mentioned, this always got rejected so I began by taking each T-SQL statement to identify which statement was failing and transferred them to a manually created text file called "manual.sql". After each import test to my host it was successful??
The culmination of my trail and error routines ended up with a manually created file which was exactly the same as the originally created file from the Publish to Provider utility which then imported successfully????
The question is why did the original file from the Publish to Provider utility not work?
The only thing that stands out as a giveaway to the potential error is the difference in the file size of the two files. The manual file that I have ended up with, which imports fine, is exactly (within 3 bytes) half the size of the originally created file?
As you can see I have got round this issue but it would be great to find out what the source of the problem was so that it could potentially be solved at the creation of the original file from the Publish to Provider utility.
Sorry, I was hoping to upload the two files for reference but it seems I cannot do this.
Thanks in advance to anyone who may be able to help.
Kind regards,
Ian Ryder.
|
|
|

May 17th, 2012, 10:57 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I had seen your original post but was too busy to answer.
Maybe this helps:
SQL 2005 Syntax checker Tool
Otherwise, you should ask your host. Maybe they don't support this or handle this well? Also, if you think it's the file, not its contents, try saving it in a different format in Notepad for example andsee of that works.
Imar
|
|

May 17th, 2012, 11:49 AM
|
|
Authorized User
|
|
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Notepad Save As Using Different Encoding
Hi Imar,
What would I do without you?
I knew the issue was to do with file formatting but I just did not know how to change it in notepad. After your comment regarding my suspicions about file formats I went hunting and found that if you "Save As" in Note Pad you can change the file encoding from its default format.
As it happens when you use Publish to Provider with VS2010 it uses UNICODE formatting as a default. When I changed this to ANSI formatting the file size halved in size and I know this was the answer.
When I did the import to my host all worked perfectly. This may be web host specific, but I do not know?
Now that I know the issue all is well, but maybe this is something you may want to comment on in the future. I will leave it to you to decide.
Thanks once again.
Kind regards,
Ian Ryder.
|
|

May 17th, 2012, 11:52 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Ian,
Good to hear you got it working.
Quote:
|
Now that I know the issue all is well, but maybe this is something you may want to comment on in the future.
|
Absolutely; I wasn't aware of this issue but I'll certainly mention this in the upcoming 4.5 version of the book.
Cheers,
Imar
|
|
 |
|