I am following this tutorial and four minutes in he simply runs the application- after I do the same I get "web page not available". I did everything like him and set override application root url, I set the start URL and then set the applicationhost.config like he did:
<binding protocol="http" bindingInformation="*:80:www.onenotedemowebsite.com" />
Of course before I did any of those things, the MVC application worked fine while the binding info was left to localhost.
Can I get any suggestions?
I suspect you didn't add the url to hosts file like they did in the video.
Open the file: C:\Windows\System32\Drivers\etc\hosts in Notepad(open as administrator).
Add the following line:
127.0.0.1 www.yoururl.com
Save and close the hosts file. Restart the browser and try again.
Have you changed your hosts file?
%SYSTEMDRIVE%\Windows\System32\drivers\etc\hosts
You should put a redirection from localhost to the site like this:
127.0.0.1 www.onenotedemowebsite.com
//EDIT: Was to late...
Related
I created a Blazor project in VS. If I press the Run button, it shows up in the browser and functions normally.
The problem is that the free hosting site only allows a sub-directory of the host URL. That is, something like "https://myid.hostingsite.com/projectname". In the configuration page, it seems that I have to use a command like dotnet test.dll -urls="http://$IP:$PORT", where $IP and $PORT are internal values provided by the system, and some sort of reverse proxy maps it to "https://myid.hostingsite.com/projectname".
If I run the Blazor project on that hosting service, it tries to load the css file from "https://myid.hostingsite.com/css/bootstrap/bootstrap.min.css" when it should be "https://myid.hostingsite.com/projectname/css/bootstrap/bootstrap.min.css".
How can I solve this problem?
The CSS can be fixed in index.html or index.cshtml with
<base href="https://myid.hostingsite.com/projectname/" />
See if the rest still loads.
I have a web and use IIS to setup
when I upload a pdf file which is over 100kb
there is two situations
1. On the IIS local PC
the action will success like this and the file is placed in the temp folder
enter image description here
2. On other PC
the action will fail and show nothing choose like this and the file is not placed in the temp folder
enter image description here
I have tried some solutions
set maxAllowedContentLength in web.config
set maxRequestEntityAllowed in web.config
enter link description here
set Maximum Request Entity Body Limit in IIS => ASP
Set Load User Profile = False
source : enter link description here
Plz someone help me to solve this problem
sorry for my bad English :(
The solution is changing IIS website port to 80 port
Use the following code.
<httpRuntime maxRequestLength="51200" executionTimeout="300"/>
my solution is work on my localhost and ı can contact my remote db on plesk my local host its working
ım start my solution relase mode and zip this file and upload my plesk and under httpdoc ım unzip my files after that ım add a new line my webconfig in system.web but my preview and my website is dont works now i try to go previer go right path http://188.121.43.19/Home/Listele its my right path ı was redirect my index page this actionview but this page return 404
<system.web>
<trust level ="Full"/>
what is wrong ı cant find ım try to search logs but logs looks like fine for me if you want to look logs or any file please say which logs or file and ı wıll publish here or somewhere and put link here.
I'm stuck at this point, and I'd appreciate it if you could help.
Solved
in web.config in add this
and remove everythink in this tags
I'm new to IIS and I'm trying to use a local hostname to differentiate my web projects. Basically, what I want is to do something like:
http://myproject.dev
and access it directly via the web.
Normally, with an Apache server, I would create a virtualhost and I would add an entry in my hosts file.
So, I tried to do the same with IIS. I created a a website as follows:
In my hostfile, I then added an entry:
127.0.0.1 myproject.dev
However, when I type the address, I'm redirected to my IP Address and I can't see the website.
Am I missing something?
Edit 1:
aha, I got it, it is host file issue, just remove:
127.0.0.1 localhost
or comment it because it make everything go back to 127.0.0.1
and write yours like this:
127.0.0.1 myproject.dev
You just have to create a folder in c: --> inetpub --> wwwroot than just type localhost/yourprojectfolder..
On Local host,my solution works fine but on server when i deploy ,it gives that file not found error. and the error message is something like this.http://localhost:27375/favicon.ico
I don't have any such file in my application.I tried to create on in the root folder but no luck.any help is highly appreciated
Your favicon.ico file should be in your root directory for the web site.
It looks like your application is still trying to connect to the localhost in order to display the favicon. Are you hard-coding your URL to the favicon with a http://localhost:27275/favico.ico address?
To build on what Internet Engineer said, using ASP.NET, you can use a relative path prefaced with ~ or /. So, you can use ~/favico.ico or /favico.ico in order to reference your icon file.
First check in web server if you can see the file directly in the browser:
http://productionwebsite/favico.ico
If the file is there, now you need to check that the code is using relative paths. Most likely this is coded using absolute paths.