Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9
This is the forum to discuss the Wrox book Professional ASP.NET MVC 1.0 by Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie; ISBN: 978-0-470-38461-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 18th, 2011, 09:24 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2011
Posts: 24
Thanks: 3
Thanked 0 Times in 0 Posts
Default Publish successful but not really

I am not sure what is going on here, I used to publish OK no problem but it suddenly failed.

First of all, it complained about me not running as the administrator - even though it used to work if I just run VS2010 (without running as the administator). So I opened VS2010 and run as the administrator. Rebuilding the app was OK. Then when I published with "Delete all existing files prior to publish", most (if not all) of my project files went to recycling bin!!!

I recovered them by copying them back in place, and start again. This time, debug and the rest OK. If I run at debug mode everything is working.

This time I publish with "Replace matching files with local copies", it published OK but the app still doesn't work. After a few publish (without changing anyting), it starts throwing out error on publish "Unable to add 'Web.config' to the Web site. Unable to add file 'Web.config'. The process cannot access the file because it is being used by another process." App still doesn't work but works perfectly in debug.

I did a few more publish, sometimes it succeeded, sometimes it failed on error as stated above.

Please help.....there I was thinking that my app is ready for release

Thanks in advance.



I have everything working
Reply With Quote
  #2 (permalink)  
Old July 18th, 2011, 09:55 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2011
Posts: 24
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Just have some findings....I looked into web.config file (of the root) and there were 2 connectionstring (one says "GymAttendanceConnectionString" and the other one says "GymAttendanceConnectionString1". Not sure why/when the 2nd one was put in, but the 2nd one, which is being used in the app apparently, didn't have any username or password. Perhaps it was put in when I put in the data connections via server explorer after loosing the old one?!!

Anyway, as far as the app is concerned. It's all ok now.

However just one confused issue: why would selecing "Delete all existing files prior to publish" when publish remove most of my source files???? Could anyone explain please? I thought it was just removing all the compiled files?!
Reply With Quote
  #3 (permalink)  
Old July 18th, 2011, 11:41 AM
Imar's Avatar
Wrox Author
Points: 67,755, Level: 100
Points: 67,755, Level: 100 Points: 67,755, Level: 100 Points: 67,755, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,287
Thanks: 66
Thanked 1,439 Times in 1,419 Posts
Default

Quote:
why would selecing "Delete all existing files prior to publish" when publish remove most of my source files????
This is what that option's designed for: it clears the target folder before you publish. Maybe your target folder is accidentally your project / source folder?

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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
successful installation but blank page shown SoloEng BOOK: Beginning SharePoint 2010 Development 2 November 29th, 2010 10:14 AM
Error after Publish tedr BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 0 March 20th, 2010 12:12 AM
Publish query codeuser BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 0 February 10th, 2009 07:08 AM
Upload successful but no file ! ionut_brasov Beginning PHP 1 August 3rd, 2007 05:01 AM
I just want to get a successful connection Prorunner PHP Databases 1 September 28th, 2004 02:32 AM



All times are GMT -4. The time now is 05:39 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.