Hyperlink to EXE file - asp.net

I have created a simple windows .EXE that copies files from one location to another on a target computer.
However, on the website that I'm testing this on, I created a hyperlink:
Here is the download.
However, when I click on the link, it attempts to start CustomApp.exe which is not what I want to happen. I want to prompted to accept the user file, then run it.
Is this something I need to configure on an IIS 7 machine, or in my ASP.NET page?

It's the way your server serves that mime-type. Might have to configure it differently or serve the download using a php/asp.net page and edit the headers.
Some more explanation on how to do this in asp.net from asawyer:
http://msdn.microsoft.com/en-us/library/dhy78ycf(v=vs.71).aspx

Related

how to display asp pages on server without iis

Im using ssh&xming to upload files to my server. I have no access to the settings of the server, so I dont know if IIS is installed.
Im trying to run a asp.net project on my server, but all I get when Im trying to run the webpage is the source code.
how can I display the page? is there any way to install IIS on SSH without any access to the settings of the server? or to upload some other file to the server that can help run aspx files?
how to display asp pages on server without iis
thanx
No you cannot install IIS (or anything else) if you don't have administrator access to the server.
And no you cannot run aspx files without IIS. Maybe, just maybe there are ways to do that if you really wanted to, but I'm not aware of that. And why should you? That's like trying to make a boat fly while there are already airplanes available.

Hiding Sourcecode on IIS Server (ASP.net)

I have a question about hiding or encoding the source code on a server which runs IIS.
At the moment the source code is available and visible for all users who are logged into the server where the IIS Server is running.
Is there a way to hide the Code (encode) with Visual Studio or any other software?
I think the aspx (or *.html) web site code can not be encoded but (for example) the *.vb code sites should be able to encode.
You can simply Publish the website
Build Menu => Publish Web Site
So the code behind files (*.aspx.cs) will get converted to dll(Bin/*.dll) file.
Refer this: Walkthrough: Publishing a Web Site
When you are ready to put your project live make sure that you.
Publish it.
When you publish it that you tell it to compile your code into a single library or code behind files.
If you want to protect your html as well then you should not select to make the site updateable.
These steps will protect your code but as for your web.config file you will need to look at some other articles on securing its info.
If you can, I would recommend ensuring that only the authorized people have access to the server and/or the code base running on the server. If that is the case then you should be ok.
Go to Build menu---> Click on Publish the Website.
then a folder get created on the base folder. and the encoded files are available there. That can be upload to the FTP account, then third party can't see the source code with the browser.

How to improve my pushover process

Currently, in order to push my website live I upload files to the server via FTP using FileZilla. If a user reloads the site when I'm pushing over the website DLL, they'll get a File is being used by another process type of error.
Are there any better pushover techniques I can make use of to get around this issue or any techniques that are generally better than using at FTP client to upload my site?
You can always upload an app_offline.htm file while you are deploying the new site. If you do this in an asp.net application the user will be directed to the app_offline.html file no matter what page they try to load/reload. When you're ready for them to access the site again you simply remove/delete/rename the file (i usually just rename it so it's a simple rename to get the site back into offline mode).
http://weblogs.asp.net/dotnetstories/archive/2011/09/24/take-an-asp-net-application-offline.aspx

opening folder in web site structure in Windows

I am trying to set up a hyperlink to open a Windows Explorer, so that it can display a folder on the web server that is within the web site.
So in IIS, we have inetpub/MyWebSite/subFolder/Data/
I would like to allow for a web page hyper link to open the folder /Data
I can set up a user account on the web server and only provide access to this folder. I can use ASP Membeship to restrict access here, and/or assign the Network Service acccount access.
I don't really care who can see this folder as anything that gets placed in here will only be temporary, and nothing is "Mission Critical" just a file that the web site will read and write to and then it gets deleted.
Any and all ideas and suggestions will be tested.
Thanks for any help.
Build a representation of the folder's contents (using a DirectoryReader and CSS) and display that. Don't actually try to display the physical folder.
this sounds like FTP, and if it's on an intranet, why not create a share? much less work.

browse button on server

When we put a browse button on an html form, it gives us the option to browse the file on our system only. If I run it on a server, will I be able to browse it on server paths? Basically I want to access the files available on the server. Is it possible?
This is a browser control, so will only allow you to display files that are local to the browser.
If you want to show files on the server, you will need to use the FileSystemObject and output lists to the browser.
Some examples you can look at are:
http://www.micronetsoft.com/ws_webx.asp
http://www.scriptdungeon.com/freeaspscript/freescripts8
http://www.gleamtech.com/products/webexplorer/asp-file-manager
or just search "web file manager"
The files shown are essentially "your files" - so if you are running the site on a server and browsing it from a different machine, you won't be able to see the files on the server.
If you run it on a server and browse the page from that server, you would be able to see the files.
Equally, if you are on the network and map a share on the server on your machine, you should also be able to browse that (using "Map Network Drive", which assigns the share on the server to a drive-letter on your machine).

Resources