Create a folder on client machine from asp.net web application - asp.net

I have a very silly question, Can I create a Folder in Client machine from a web application. I have tried to do that.
But I am unable to do so. I have created an asp.net web application using visual studio IDE. And when I executed the web application using visual studio the folder is created.
After that I hosted the web application in IIS and the tried to access the web application. The web application was accessed successfully but the folder was not created on the client machine.
Could you please suggest me the ways of how to do it.
Thanks.

ASP.NET is a framework for creating web sites. The application using ASP.NET is deployed to a web server, for instance IIS. When ASP code behind of aspx/ascx files or C# code of external components is called it's executed on the web server (IIS).
I assume you have implemented the code for creating a folder with C# code. This code is, as I said, executed on server. On your development machine you have client (which is web browser) and server (whis is IIS) on the same machine. So the folder was created.
When you have deployed the application to a separate web server then you separated web server from client. I think your IIS hosted application has created a folder on the machine where IIS were installed. Not on your local machine.
If you want to create a folder on client side you shouldn't use C# ASP.NET code.
You should do some research how to achieve it in other technology. Here's some link for it - How to Create a New Folder for Downloading a File

Related

How to establish a testing environment in local IIS to test ASP.NET MVC website?

I've created a ASP.NET MVC web application in Visual Studio, and right now I can test it locally on my own IIS, then later on I upload it to the server for other users to access. But I want to know is it possible for me to establish a testing environment using IIS so that I can test the website without actually uploading it to the server?

virtual server to run asp.net project without visual studio

i make a web application in asp.net and this application will run on multiple computers on small network without server client ... and i need to run it without using visual studio
because the user is not asp expert ... so how to do that ??
is there is a way to make a virtual server or to run localhost ??
my web application within this path :
C:\Users\Samy\Documents\Visual Studio 2010\Projects\Redcrescent\PrecompiledWeb\Redcrescent
login.aspx the firstpage
You can host the web application on your local machine.. yes, you will need to set up IIS and configure it to do so. Then you would publish the web application to IIS.
You can google how to set up IIS on Windows 7 or whatever operating system you have.
This link will help as well.

Deploying ASP.NET MVC to windows server 2003?

Short Version
I am a beginner program and my experience with launching programs is essentially hitting f5 in visual studio. How do I deploy an ASP.NET MVC app on a windows 2k3 server? When deployed, how would I access/run the site?
Long Version:
I am attempting to launch a simple ASP.NET MVC application to my company's win 2k3 server. I have included the binaries (for the MVC architecture, System.Web.Mvc, etc.) in my project as I am unsure if sp1 for ASP.NET 3.5 is installed.
I have absolutely no experience with server deployment, outside of deploying a simple ASP classic site on my localhost, so far I've been coding with the development server.
What is the process? When I click publish from Visual Studio, I select disk path and place it on my desktop, and then I transfer that folder to the server directory I want. The directory currently works with classic ASP pages, so I am placing my mvc app in a folder in that directory.
How do I access my site? I've tried \server\directory\MyMVCAppFolder\Home and several variations. (I changed my routing in Global.asax to account for .aspx extension, which is a nessecary evil dealing with win 2k3's IIS6)
In summation, how do I deploy a ASP.NET MVC site just having access to the server directory I wish to publish it, and how do I access it as an end user?
Read through this:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Compiling an ASP .NET website into an executable (with server)

I remember many years ago using a program that would allow Classic ASP websites to be compiled into an .EXE and run as if they were under IIS. I used this program to create an interactive CD-ROM. Things like Request.QueryString() etc all worked as expected.
Does anyone know of a similar program that will do this for ASP.NET?
Thanks
UltiDev Web Server Pro. Its a free redistributable web server but requires it to be installed in the client machine.
http://ultidev.com/Forums/yaf_postsm2832_UWS-Screenshots.aspx#post2832
Microsoft calls it Hosted Web Core Applications :
"Hosted Web Core is a new feature in IIS 7 that enables developers to create applications that load the core IIS functionality. Applications that load the Hosted Web Core use a separate configuration file from IIS, and this feature enables software developers to customize the functionality for their applications. For example, you can write an application that uses the Hosted Web Core functionality to serve Web pages and applications from a Web site that is separate from the Web sites that are hosted by IIS on the same server. When the World Wide Web Publishing Service (WWW service) for IIS is recycled, your application will continue to serve Web pages to Web clients."
Not exactly, but you can pre-compile your application and ship it with IIS Express. But this won't be a single executable.

How can I deploy an ASP.NET web on IIS without creating a separate site?

I've created an ASP.NET web tool that will just be used by a few people in my team where I work. I deployed it on our internal (Win2k, IIS6) web server by creating a new website in IIS and assigning it port 81. Users can access it with an address like http://myserver:81. All the other web stuff on the server is classic ASP and is accessed with addresses like http://myserver/path/to/myfile.asp.
This works fine, but I'd rather set it up so that the ASP.NET app is not configured as a separate web site, and is just accessed via a folder path like the classic asp stuff. That way users wouldn't have to specify the port and we wouldn't get the overhead of an additional web site for every little ASP.NET app we make.
The problem is when I build the site in visual studio, it compiles all the .cs files into one .dll file, and if I just copy everything over to some folder on the server and type the address of the .aspx file, it can't seem to access any of the c# functions in that .dll file.
Can an ASP.NET app be set up like this, short of writing all C# code within the .aspx files?
Assuming you want your application to run as a subfolder of a website bound to http://192.168.1.1:
Build your website, and drop it into a subfolder called "A" in the root website folder
Verify that Network Service and IUsr accounts have read access (at least) to your Subfolder
Verify that the application pool serving the website is using the same version of the .NET Framework as your application (Probably 2.0 if you're using IIS 6)
Verify that the application pool is running under the Network Service Identity
Right click the folder in IIS, and convert it to an application
Make sure you setup an adequate default file on the application, such as default.aspx
Access http://192.168.1.1/A/ and your application should load
Note: All applications in the website must run the same version of the .NET Framework

Resources