Setting html site - c#

so I have an asp.NET website I've developed. I bought a domain and a host service. I went to the host services and uploaded all the files.
Problem: the start page has to be index.html/htm (which is located in root directory/httpdocs) but visual studio doesn't create a index.html file, so i made one myself. Thing is I cant redirect to any other files, I don't know the path. I've tried:
- "mywebsite.com/otherfile.aspx" but it says file not found.
- "mywebsite.com/httpdocs/otherfile.aspx" file not found.
- "/otherfile.aspx" file not found.
- "~/otherfile.aspx" file not found.
can anyone think of how I could access this file? I've never setup a website :(

are you sure that your hosting provider supports .Net? Httpdocs and Plesk sound like a Linux server that is not configured to server .aspx files.

Related

File or directory not found although it exists and the path is correct

I have a problem - I cannot find my file when I open it using http://localhost:49652/.well-known/acme-challenge/FfI7Xeq7_QH5R5pCd3LhAkU4k3nOqBz9mNbvJ9EwMoQ although it exists and the path is correct.
I use ASP.NET C#, OS: Windows Server 2012 And IIS 8.0.
And error:
Help me... Please!
I want to forward you to an other question: What file extensions are blocked by default in IIS
The issue is that IIS has a configuration, how to handle requested files.
Depending on the extension, there have to be done different actions: While resources like .txt or .jpg files are just sent into the network as they are stored on the disk, other files like .aspx or .asmx have to be parsed, executed in dotnet and then the output have to be sent etc.
Other extensions like .dll or .exe are blocked by default, I think.
The problem is, that your files do not have any extension, so for this directory you have to configure that IIS should pass through all of the files.
Found another usefull link to microsoft: https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/requestfiltering/fileextensions/

Deploying a Click-Once Application

I am trying to deploy my application to be downloaded from my website. It is written in .NET 4.0. I think I have it on my server but I am not sure? When I try to deploy it again I receive this message.
Here is the setting I have for publishing.
And as you can see from the website, nothing is there.
Im not the best with web stuff, so my question is what the heck am i missing.
More Info
So. I published it to the wrong location, but i found it.
Currently, your folder http://www.theinsanityelement.com/insanepin/download/ is empty. You have entered ftp://neshmet.dreamhost.com/ as target location - I guess this is mapped to http://www.theinsanityelement.com/ root. That means you should enter
ftp://neshmet.dreamhost.com/insanepin/download/
as publish folder location, or whatever path is mapped to your target URL. Then you can access the download page from
http://www.theinsanityelement.com/insanepin/download/publish.htm
You could also change the "Deployment Web Page" name to index.htm, then the following would also work:
http://www.theinsanityelement.com/insanepin/download/

Cannot download ".config" files from host via http

I've published my ClickOnce application to my website via FTP.
I've got 404 error (not found) when run "app.application". In log file there is a line that says cannot find "app.exe.config" file.
I noticed that I can access to this file via FTP and online file manager of website, but when I try to use HTTP, this error is shown.
I've created new files with different names on website (all of them have .config or .cfg extension), but result is the same: I cannot access them via HTTP (through address bar of browser).
I am using a windows web hosting server and it has a "web.config" file in the root folder of website.
Should I do any change in server settings or I must rename my .config file?
any help will be appreciated.

Source file issue with File Upload Control

I have a problem with a web form project.
The project is set to use the local IIS web server to run the application.
In the form, I have a file upload control defined in the aspx markup page.
However, when I try to upload a file, the program always thinks that the file is located in the IIS Express folder, whatever the location of the file actually is.
I have tried to change the settings to make it use the visual studio development server but I hit the same issue. The program then always thought that the file to upload was in the development server folder.
How can I fix that?
Thank you.

What files do I upload in a C# Web API project?

** Dumb questions alert **
I created my first Web API project. I would like to test it on my web host, but I can't figure out what files to upload. I tried to upload everything from the HelloWorld folder, but I get a 403 "Access is denied" error when I attempt to access the files.
Once I upload the folders/files, how do I access them? Do I have to navigate to the Root > Views > Home > ... ?
Folder Structure
HelloWorld
HelloWorld
_UpgradeReport_Files
1 css, 1 xslt, 4 pngs
HelloWorld
All of my folders and files
This is what I tried to upload
packages
A lot of ASP and JQuery folders
Thank you for your help.
I think you have two separate problems here: knowing what files to deploy and getting the permissions correct so that you can access them.
In general, the files you will need to deploy are all of your static files (images, CSS, Javascript, HTML), any .cshtml/.aspx/.ascx/.asax files, and Web.config. However, the easiest (and best) way to know what files to deploy is to use Visual Studio's publishing mechanism. Go to Build->Publish, and publish to a local directory. Open that directory, and you'll see all the files you need to deploy.
As far as the second problem, that's more complicated. The solution depends on the version of IIS, but the basic upshot is that you need to give the correct user access permissions to your file. Depending on your version of IIS and how it's confusing, it will either be IUSR, IIS_IUSRS, or NETWORK SERVICE. Try Googling for "file permissions IIS ".

Categories

Resources