p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 (http://p2p.wrox.com/forumdisplay.php?f=490)
-   -   Publish successful but not really (http://p2p.wrox.com/showthread.php?t=84391)

bh81 July 18th, 2011 08:24 AM

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 [:confused:]

Thanks in advance.

I have everything working

bh81 July 18th, 2011 08:55 AM

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?!

Imar July 18th, 2011 10:41 AM


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?


All times are GMT -4. The time now is 03:01 AM.

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