Wrox Programmer Forums
|
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
 
Old May 17th, 2012, 10:31 AM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default 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.
 
Old May 17th, 2012, 10:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old May 17th, 2012, 11:49 AM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default 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.
 
Old May 17th, 2012, 11:52 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Publish to Provider .sql File Structure/Format Ian Ryder ASP.NET 4 General Discussion 0 May 15th, 2012 10:19 AM
Publish history? Ron Howerton ASP.NET 4 General Discussion 2 May 11th, 2012 08:33 AM
Installation Limit - VS2010 techbyter .NET 4 and Visual Studio 2010 General Discussions 2 July 12th, 2011 08:43 AM
vs2010 IIS error LSyracuse BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 1 November 2nd, 2010 04:48 PM
My VS2010 License Says 'Microsoft' GeneBuchite Visual Basic 2010 General Discussion 2 September 29th, 2010 01:12 PM





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