ASP.NET - How to Deploy in VS Express 2013 for Web? - asp.net

Ok, so I have been creating the same project like 15 times now, have created it in 2008, with the .NET Framework of 3.5 (New Web Site, New Web Project, and OMG, like all different ways). Have deployed this, however, when I try to load it in localhost, (because I am building these Applications directly from within the Server), I get all kinds of errors. Than I get an error that says, needs to use .NET Framework 4.0.
So, in order to use .NET Framework 4.0, I need to have atleast VS Express 2012, so I get VS Express 2013 and Rebuild the Application again, but this time, I do not see option for Web Application in this software, I see this: ASP.NET Web Forms Application, there is an option for ASP.NET Empty Web Application and I have done both of these damn things! Not sure which one is supposed to actually work.
For the Forms Application, I don't see any option to Publish it, only to Build!
In any case, how the hell are you supposed to transfer your VS 2013 .NET Framework 4.0 Web Application so that it will work on the actual SERVER (Public URL)? How to do this is baffling the hell out of me. No matter what I do I get errors, I can't even get VS Express 2013 to even work when building it, since it gives me 500 error or Page Not Found 404 Error. Atleast with VS Express 2008, I got some errors on the page that told me that the aspx file actually trying to load in the browser.
How do you deploy this project in VS Express 2013 for Web Exactly? What are the steps to do this from within the actual SERVER itself? Also, I just want a simple web application that ties into an existing site (that will use an iframe on an existing page) that uses a Web Service. What application to choose to use? What type should be created? There are so many and they all seem the same to me! I believe the type should be ASP.NET Web Forms Application, but this doesn't seem to want to be published after working in it. It only Builds, and than I don't know how to put it on the Server after that. I have it in a folder on the server, but it loads nothing when I go to that page. It can not find the Default.aspx file. ARGGG! I am pulling out my hair now!
Perhaps there is a URL somewhere online that explains how to do this? From within the localhost itself?

You will see publish option if you Select your Website in the solution explorer and
1) right click it
Or
2) Go to Build menu on the top
Regarding project types:
-> If you select New Project -> You get option for creating a Web Application
-> If you select New Website -> You get option to create Website
You might want to upload some screenshots of your VS environment / errors to show what problem you are exactly facing.

You can create a Web Application Project in Visual Studio 2013 Express for Web. After creating the Web Application you can Publish it to the web but you need to create a profile. You can also publish to Windows Azure.
Some steps are shown in this article:
VS Studio 2013 Express for Web is also known to have a bug in its UI: here
If some items are missing in the UI, perhaps the application is corrupted and you may need to reinstall.

Related

Recreating solution file in Visual Studio 2010

I need help re-creating a web solution file (at least I think that is what I need). I inherited a web application from another developer that left our company. It was created in Visual Studio 2010 and uses ASP.Net 2.0. There was no solution file, so I created a web application project and manually added all folders and files into my new solution. I did not make any changes to any file in the web application.
When I run the app from within Visual Studio, it starts up to the default page fine, but when I click a link on that same page, I get:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could
have been removed, had its name changed, or is temporarily unavailable. Please review the
following URL and make sure that it is spelled correctly.
Requested URL: /SomeCompany/startProject.aspx
Version Information: Microsoft .NET Framework Version:2.0.50727.8009; ASP.NET Version:2.0.50727.8008
My original start location: http://mylocalurl:65212/default.aspx
Link on the default page: http://mylocalurl:65212/SomeCompany/startProject.aspx
If, after clicking the link and getting the error page, I can remove "/SomeCompany/", and successfully get to the page. But I've seen the previous developer run it in Visual Studio and click the exact same link with no problem.
I need it to have the /SomeCompany/ in the url and work just like the previous developer had it so I can maintain and debug it as needed. What am I doing wrong in re-creating the solution...or is it another setup problem that I am not thinking of?
You could have probably just used file -> open web site. It probably is not a Web Application. Visual Studio has multiple types of web projects. Visual Studio will create a solution for you that you can save after you open the website.
Web Application Projects versus Web Site Projects in Visual Studio

New WebForms Application Template FriendlyUrl and Css not working on Server

I created a new project from Visual Studio 2013, it is a basic web application using 4.5
I added some style and content to the default page. When I run it locally using the debug it looks good. However, I publish it like my other sites on my server the friendly url pages are 404 and no style is applied from the bundle. There are not any errors to easily see what is going on. Does anyone have a quick fix so I don't have to dive in deep wasting lots of time?
Running Win Server 2008 R2 and IIS 6.1
Please see my code at: https://github.com/ad5qa/SARGroups
Image A - Visual Studio IIS Express
Image B - From Server
When you are bundling, the bundle is served using /Content/css. Since this file does not have an extension, you need to configure IIS 6 to handle this request. This is probably also the case with your FriendlyUrls
You should be able to use the following solution from Phil Haack to solve both problems:
http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx/

Visual Studio 2010 displays IIS 7 page on debug instead of my project

This is my first ASP.NET project so I am a bit of a rookie when it comes to a lot of the configuring of IIS/Visual Studio so bear with me...
I am using Visual Studio 2010 running on Windows Server 2008 SR2. We recently did some updates on the server and now my project no longer loads when I attempt to debug. When I try to debug the default "Welcome" page for IIS 7 loads instead of my project. I am set up to use the development server to debug, not IIS so I don't understand why I get the IIS page. Before the updates the debugger was pulling up my page without any issues.
Any ideas? Thanks in advance!
It looks like IIS is now bound to the port number that Visual Studio Development Web Server was using previously. You can change the port number in the properties of the web site project.
I have found a solution to my issue. I decided to use IIS instead of the Development Server for debugging. After attempting to debug unsuccessfully yet again, I took a look at the identity that was being used in the application pool and I changed to one with more privileges and that seemed to do the trick. Thanks for the suggestions.
I had the same problem but non-of the earlier answers worked.
I am using Windows 7 enterprise 64-bit, IE11, VS2010, Silverlight 5
I have been developing and maintaining a number of Silverlight projects for the past 5 years, and have always been able to debug them within VS2010 using the ASP.NET Development Server. However, on returning from some well deserved holiday, I found that none of my existing Silverlight projects would run in the debugger. In each case there is a Web project set as the start-up project, and in each case on starting the project within VS2010 (with or without debugging) I got the IIS7 web page instead of my application.
I tried creating a new Silverlight web application, and found that this started normally in the ASP.NET Development Server. I checked my source code and found that no changes had been made in my absence.
After a lot of head scratching, etc., the solution was to clear the IE cache. These are the explicit steps I used:
Close all instances of IE and ASP.NET Development Server.
Open Internet Properties from the Control Panel.
Click "Delete" on the General Tab.
In the Delete Browsing History box check the following options:
a) "Preserve Favourites website data"
b) "Temporary Internet files and website data"
c) "Cookies and website data"
Leave the others unchecked
5) Click "Delete" and wait for the command to complete.
6) Close the Internet Properties box.
7) Rebuild ASP.NET project
8) Start (with or without debugging) in VS2010 - it should now load normally.
Hope this works for you.

Visual studio : when i checkout any file, session in my web application is lost

very strange that on checkout visual studio kills sessions, so when i checkout any file i have to log back in to my asp.net application again and again, its annoying :(
I have noticed above behaviour in visual studio 2010 and 2012, using it with VSS or Team Foundation Server. MSDN documentation Checkout does not have any details about such behaviour.
Wondering is it me ? or my code ? or its something Visual studio does?
anyone else is facing same problem ?
If Visual Studio detects a change in certain files, it will restart the web application if it's hosted on the internal development server (perhaps even IIS Express), which will in turn invalidate your user sessions. I'm not sure it works for every type of file, but I know it happens for me with the cshtml views since Visual Studio 2012. Obviously, like in IIS hosted web apps, a change to the web.config will cause a restart also.
Your best bet would be to externally host your site, meaning host it in IIS, not in the development server (Cassini). You can configure this in your Web Application's project properties.
There IS a workaround. I found it out by accident:
App_offline.htm created/deleted whenever I check out a file in TFS
The title is misleading; nevertheless it's all about the checkout process and the annoying session drop.
It does work for VS 2013 and VS 2015.
The answer above is so much difficult to access that it's worth creating an answer here. Thanks to the moderators for their understanding.

how do i connect my asp.net

Another beginner question for ASP.NET:
I'm starting an ASP.NET project in Visual Studio 2008, and would like to link it to a folder on a remote server (as in it builds/publishes to this folder). It may be my phrasing, but I cannot seem to figure out how to do this (even with Google at my side!).
I naively tried to just upload the code files to the server, but running my code produces errors related to the fact that the pages are not set up as an application.
Any help would be appreciated (or a link to a resource where i could learn more about this basic asp.net/vs08 stuff I keep running into).
On your web server the folder you copied your files into needs to be set up as an application or a virtual directory. This is done through the Internet Information Service panel found in the "Administrative Tools" off the Control Panel.
Depending what flavor of IIS you are using the procedure may differ.
Visual Studio 2008 has a publish feature. If you right-click on the web project there is a "Publish" option. You can then select where you want to Publish your files.
2 fast answers:
You can use the Publish option in Visual Studio and create a folder inside wwwroot to publish
Alternatively, you can create a simple setup program. Just add a new "web setup project" to the solution and add the results of the web site to the setup project.
And of course, have you tried googling asp.net deployment to get some help?
Good luck! :)
You will love Visual Studio 2010, which should be out in early 2010, if it follows previous versions. This would also mean an MSDN release a few months earlier. Why? Better deploy story.
As for where we are today, you can publish and have a directory created. You will have to publish to IIS instead of a directory to accomplish this. This means you have to have permissions to add a web app and publish to it.
For a directory, you will have to create the app in the IIS Manager. If you do not have access, try the IIS admin. If you cannot get them to do it, you are back to publish.

Resources