problem with asp.net website project - asp.net

I've an asp.net web site project in Microsoft Visual Studio 2010. the thing is that i need it all to copy to a flash drive, and than later to open it as simple in browsers/
I published my project to my drive, and tried to open my .aspx pages with Internet Explorer but i got some error. I really need to do it, urgent.

Somojon: You can't just open an asp.net page using a browser without having the web server (IIS, most of the time) process the page and spit out HTML that can be rendered on a browser.
You can copy the whole project (as Mrchief said) to your flash drive but before you attempt to open the project from your flash drive, you need to copy it again to a computer and configure IIS (or another web server that has support for ASP.NET).
I imagine you think you can do this because you can run your project with Visual Studio, but that's because Visual Studio comes with an the integrated web server that process the ASP .NET code and spits out the HTML to display on your browser. Bottom line is that when you move your project to another computer you will need a web server to serve your ASP .NET pages.

Copy the entire solution folder. Publish is not going to help because that publishes files that are needed to run the site, not the whole project.

This is not going to work, you should have a web server to run your ASP.NET website, IIS, IIS Express or other ASP.NET compatible web server which should execute the compiled assemblies and serve the pages to the browser.
if you simply open the pages with a browser without having a server processing them, nothing executes.

Related

ASP page only works in Chrome when debugging with Visual Studio (2008)

I'm attempting to access the system clipboard using ASP with Chrome. The server page includes System.Windows.Forms, among other dependencies. When I debug the page using the ASP Development Server through Visual Studio, the page runs fine, and does what I expect. However, if I try to run with IIS, without debugging through the ASP Development Server, I get 500 internal server error. I've searched on getting more information about the error, but it seems that Chrome doesn't provide a method for retrieving "non-friendly" server error messages. Any ideas on what could be going wrong? What is different about the ASP Development Server provided by Visual Studio from the ASP Server in IIS? Thanks in advance.
Woah there cowboy, you don't want to reference System.Windows.Forms from a ASP.NET project. System.Windows.Forms is used for native windows application development and it will not be accessible through a website and certainly not through IIS.
If you're trying to access the clipboard on your page, then check out this answer from elsewhere on SO. It is a simple flash control that you can embed in your page which exposes the clipboard to your page javascript so you can manipulate that data as needed from there.

ASP.NET deploy/build/publish website to local disk with SQL

I don't know how to do that. This is my first project in Visual web developer and I never did that. My webform is connected (create, delete & edit) to SQL server and everything is working from the Visual web developer but how to export web project to be functional from local disk?
P.S.Only video on ASP.NET site that describes that doesn't work. Also Build web site does nothing.

How to run asp.net webpage on the localhost

I am just learning asp.net and have created a simple webform on visual studio. How I can run this on the localhost(xampp). Like HTML you simply put files to the server folder and it works. But when I copy all asp files it simply shows me source code?
It is stupid question but I really need answer...
ASP (ActiveX Server Pages) is a deprecated technology (superseded by ASP.NET). Thus support is not included as standard in IIS. But it can be added by using Server Manager under Roles | Web Server (IIS) and scrolling down to Role Services.
If you however mean ASP.NET then, initially, look at the Web tab of the project properties and start in VS for debug and test. Once that is working you'll need to read up on deploying ASP.NET on MSDN.
To host a ASP.Net page you usually use IIS. You are supposed to run IIS on your server and host the ASP.NET website on the IIS Management
This Article on MSDN should help you with that.
Also, you usually use visual studio to 'Publish' to the server folder, rather then copy and paste the files. In case you didn't do this: this is done by right-clicking the project in visual studio and selecting 'Publish'. Then there are a few options, you can publish to a folder (File System) and then move the published project to your server, or publish it straight to your server.

Deploy website from a Windows XP Desktop

On my Windows XP desktop, I have a fairly simple ASP.NET targetting .net 4 in Visual Studio 2010. I can run it on my local host by ctrl + F5, it works all fine.
I have a Windows Server 2003, that I can access via mstsc, but also via Explorer. When I go to the publish section of my build properties, i see 4 publish methods :
Web Deploy, FTP, File System, FPSE
I have already installed IIS 6 successfully on the Windows Server, and given all authorizations for everything I could so far (to get things to work in the first place, will check on that later).
How should I proceed to publish to that remote machine ? Should I target a specific folder ? Do I need to setup things in IIS 6 for that site first ? Or will it all get settled from te properties I have in Visual Studio ?
Thank you guys,
J.
Personally I've always plumped for a manual deployment; that is I create the Web Site in IIS creating an appropriate AppPool and targeting the correct .NET version to utilise. From there simply copy (xcopy if you will) the appropriate files over, e.g. DLL and all supporting pages such as ASPX, CSS and associated images. In most situations where I have direct / RDP access this is what I run with.
That said, this can be automated from Visual Studio and this can be useful for those situations where you're maintaining an awful lot of sites on a regular basis. With IIS 6 and Visual Studio, this was achieved by installing FrontPage Extensions on the server then utilising the Publish option.
For VS2010 it seems this has been streamlined using the IIS Web Deploy module and configuring the Studio to publish in this manner that looks mildly quick...
HTH
I've never used the Web Deploy feature in 2010, so I can't really tell you about its merits or drawbacks. I've read that it works much better with IIS7 than IIS6. If you have direct access to the IIS root folder on the server (typically c:\inetpub\wwwroot) through a network share I would recommend doing the file system deployment. FPSE works as well if you have to publish to the server through a remote URL, but there are some security issues with FPSE that make enabling it on your web server a less than ideal choice.
Once the files have been deployed, all that should be left is to configure the website as an application inside of IIS.
Remote in to the web server and open IIS
Right-click Default Web Site and choose properties (if you've deployed to a subfolder in the root, then locate that folder and choose those properties instead
Switch to the Home Directory tab (Just 'Directory' for a subfolder)
Look for the Application Settings section and click the button that says Create
Optional: Select an app pool if you have created a custom one from the default
That should enable IIS to execute your .aspx files inside of your application. Once you've successfully configured the app for the first time, you can just keep publishing your app to the same location over and over without having to reconfigure it.

How to deploy an ASP.NET web site

I have an ASP.Net website that I built in a computer science class. I built it in Visual Studio and the solution is on my local drive. How would I deploy this to a real website?
You will need to do a few things.
You will need to get a hosting account that supports ASP.NET
From there you can use the "Publish" option from within Visual Studio under the "Build" menu option to push out a copy of the site.
When publishing you should publish in release mode.
Get hosting that supports the version of .NET and ASP.NET you have used and copy the files over.
Assuming that already you have an IIS application and web folder set up on a web server somewhere, the simplest method goes like this:
In Visual Studio, right-click on the web application project, and click Publish.
Select File System as the publish method.
Select a target location. This is where the publishable files will be placed. Use c:\pub or something similar.
Hit Publish
Once the publish operation is done, copy everything in c:\pub (or whatever target folder you used in step 3) to your web folder on the web server. Depending on your server accessibility, you may need to do this via FTP.
You might also investigate ClickOnce Deployment if your server supports it.
If you don't already have server space, you'll need to find a good hosting provider that supports ASP.NET. Google has many suggestions.

Resources