Problems with 'Publish Web Site' on Visual Studio 2010 - asp.net

Recently I've upgraded from Visual Studio 2008 to Visual Studio 2010, however I'm having various problems when uploading my compiled web site to the live area. I'm doing exactly the same as I would have done with Visual Studio 2008, however, now I receive errors such as:
{filename}.aspx is not a pre-compiled file
masterpage.master does not exist
All these errors don't make sense. Has anyone encountered these problems before, and was a solution ever found?

Try run the Clean Solution command from the Build menu on your solution.
Try diagnosing by publishing to a brand new IIS location. Perhaps there are files from your VS2008 build that aren't being overwritten by your VS2010 build.
Are all the files present in the bin directory as you'd expect?
Is there an PrecompiledAppConfig.config file in the root?

You can run the Clean command by selecting Build -> Batch Build. You will see the options Build, Rebuild, and Clean in the dialog box.
The web site does not have to be created in IIS in order to use the Batch Build dialog.
Hope this helps,
Rick

you probably have not created an application or virtual directory on your server.
use IIS Manager to create it

Related

How to create an exe out of ASP.NET project

I need to create an .exe or find a way to run my project in other computer witch i don't have and i cant install Visual Studio. Is there a way to make this possible? Btw I'm using Visual Studio 2013. Thanks anyway.
You don't need visual studio to simply run an ASP.NET project, you can publish it to any machine that has the .NET runtime and a suitable web server.

Visual Studio 2017 crash when publishing web application

After updating my Visual studio to version 15.8.1 it has started to crash every time I try to publish a web application.
I try to use web deploy and fileSystem options, both crash. Changing the settings like unchecking delete unused files as no effect. Giving full permissions to the destination folder has no effect either.
Recreating the publish profile solved the issue. Something must have changed for pubxml file.

asp.net Attempting to create publish settings in vs 2012 gives strange error

I recently updated my asp.net 3.5 web project from Visual Studio 2010 to Visual Studio 2012. Every time I try to create publish settings it says the following:
{There are errors in web.config. Please correct these errors and try again.
The first error is: "Web.config appears to be in invalid state. Please correct it and try again."}
I have been unable to determine what this means. I have no errors in my web.config that it is telling me about. I have search for this error and have come up with nothing.
Can someone please help me out?
I should also mention this entire project resides on a mapped drive. I am still able to open the project and publish it in Visual Studio 2010 but can't even create the publish settings in Visual Studio 2012.
I think the below steps would help you out.
Before performing publish make sure the project is changed to Release mode.
Do not perform publish as a website. Try and publish your website to a file system.
create a virtual directory and point that virtual directory to the published folder.
The above mentioned steps worked for me.

how to Debbuging sharepoint 2007 feature with spitemeventreciever code in visual studio 2008 with break points

Hi i developed a small code in sharepoint which will copy one list items to another list,when i debug in visual studio to track error ,the break point isn't firing .Initially it was working fine but later on i did not know happened,it is not working,i did all the ways like (1)modifying in web.config file ,(2)placing GAC (3)Adding PDF in to GAC MSIL Folder(4)attaching process to the managed code (5)i have copied DLL and PDB file in virtual directory of my application ,tried all the ways,
But non was worked..if any one have the solution to this issue kindly let me know ,i am very happy person if i get one..i lost three days on this issue
thank you
Balu
Make sure you perform an IIS reset after each build. The GAC code is cached.
In VS Post-Build event, I have this in my projects.
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64\gacutil.exe" /i $(TargetPath)
iisreset
This will perform the task for you. Then just refresh the site and attach to the w3wp.exe for the web site.

Can't find the Publish Website Option in Visual Studio 2012 Express Web

I created an Empty Website (not a project) using File > New Website > Aps.net Empty Web Site. Usually when I click on Build, there is an option to "Publish Web Site". However, I don't see it here. All I can see is build and rebuild solution. What am I doing wrong? Even when I right click on the website, it just gives me an option to Build, but not Publish. I previously was using VS 2010, and it has the Publish option.
Publishing is only support for web application projects, not web site projects.
http://msdn.microsoft.com/en-us/library/dd547590.aspx
I don't know if this is true in all cases, but I just uninstalled VS 2012 Web Express, deleted the contents in the Microsoft Visual Studio 11 folder, and then installed the Professional version instead. Maybe the Express version doesn't have this, but after installing the Professional version, I do have the "Publish Web Site" option.
I believe this problem can be solved by downloading and installing the relevant Web Publish Update from this web page:
http://msdn.microsoft.com/library/jj161045
I had the same problem in Visual Web Developer 2010 Express. When I installed the update, the option to "Publish Web Site" became available to me.
EDIT: You may find that when you click "Publish Web Site", you get an error like this:
the imported project "C:\ProgramFiles\MSBuild\Microsoft\VisualStudio\v11.0\WebSites\microsoft.website.publishing.
targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I solved this problem by going into "website.publishproj" (found in the Solution Explorer with my website open), and "hardwiring" the WebPublishTargetsVersion element like this:
<WebPublishTargetsVersion>10.5</WebPublishTargetsVersion>
For some reason, the existing code was returning 11.0, instead of 10.5.
Hardwiring it like this might cause problems later if you update your version. So do it with caution.

Resources