Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have a shared hosting account. I need to host a few different websites (basically demo websites) on the same hosting account.
I don't care about domains or subdomains.
So basically what I'm trying to do is:
root/
/ website1
// index.aspx
/ website2
// index.aspx
/ website3
// index.aspx
etc...
Each website should be accessible by entering: http://example.com/website1/, http://example.com/website2, etc.
But the last time I tried something like this, I kept getting errors along the lines of the website must be in the root directory.
How can this be done?
As I see that you are using aspx extension in your files, I will assume that we are talking about ASP.NET.
If they are different websites, with different configurations, it won't work. Different websites need to be hosted in different IIS applications. IIS applications can be created in directories, but shared hosting services usually limit the ability of the user to create new ones (depends on the plan).
Different subdomains should work as different IIS applications. It could be a way to go.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Wondering if anyone has used a database as a repository of connection strings or app settings that could be use for multiple web applications across multiple different servers?
All of our web api applications have connection strings to logging database and tracing database and I know that in the next 6 months those databases will change location. With out going into each web.config setting I would like to refactor the web services other the next few months to point to a central repository for this connection string (and others).
I try very hard to avoid Machine.config which is why I have the connection string in each web.config.
We are using redis for session management and I thought about using one of the database for this since it's ultimately a key-value pair. Has anyone use it in that matter?
How have some of you gotten past this issue?
As this has been marked as too broad, let me see if I can add more details. We have close to 50 web services that ALL have the same connection string within in the web.config and are located on multiple different servers. I would like to possible edit these services to use a shared resource so that when the connection string changes we would only need to edit a single resource instead of redeploying each web service and/or editing each web.config. I am not a fan of using the machine.config.
While you can perfectly use Redis or any database to store such global settings, maybe what you need is a build script.
If you're in the .NET world, I guess you know what's Team Foundation Server, which also provides Team Foundation Build.
Instead of hardcoding those settings like connection strings, usually you would provide them as custom build properties that can be used to replace some placeholder in your files. Your files would look as follows:
<add name="myConnectionString" connectionString="server=%host%;database=%database%;uid=%user%;password=%password%;" />
Since TFS 2015, TFS Build has a scriptable build system so you can add a Powershell step to replace placeholders with actual values from the build configuration (see this other Q&A to learn more: How to replace multiple strings in a file using powershell).
Once you've replaced the placeholders, you can add a deploy step and deploy the whole application to some machine using FTP, WebDeploy or other protocols.
In summary, maybe your best bet is avoiding hardcoded configurations even in web.config if they might be different depending on the deployment, and these variable settings can be injected using a build script. That is, when you change some configuration, you do it in the build custom properties, and then you deploy your applications again with the configuration changes.
This page should be a good start for you to investigate this approach further: https://www.visualstudio.com/en-us/docs/build/define/build
Also, check Visual Studio Team Services on Azure, a variant of TFS hosted in Azure.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Thats really frustrating how hard is publish a website with asp.net 5. Very bad documentation, and all things said in internet does not work for me. Someone here already made it work? My server has iis 7.5. Do i have to install asp.net 5 on my server? I heard i do not need to install. Please help.
Can you please be more specific as to the exact steps you are getting and the error it produces?
This documentation walks you through step by step on how to configure your server to serve up ASP Core (ASP.net 5) applications
https://docs.asp.net/en/latest/publishing/iis.html
In Summary
Install the HTTP Platform Handler
Publish the site from visual studio to a folder (Publish -> File System)
Copy the files to your server
Create a new site in IIS and point it to the wwwroot folder of the copied site
Unlock system.webServer/handlers
Set application pool for the site to "No Managed Code"
Once you do this the site will run. I just confirmed by setting up a brand new machine and launching an ASP.net Core application.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I have an mvc 4 application on IIS 7.5 on my local computer, i do set bindings to my app. but currently it is only accessible one user at a time, when tried to access from another pc it shows an error The "RenderBody" has not been call for layout page. I have already modified the Limits settings > limit number of connections on IIS but still does'nt work!
This is the error shown ,when i tried to access the site from another computer in a network
to make other user able access my site successfully without error is to sign out first the currently logged in user,click this link for the image
and for that,I think my site on IIS don't allow concurrent request, **I need to sign out first in order to make other computer in a network access my site without an error.
When i am currently logged in to my site, it shows an error when i try to access my site from another pc, The "RenderBody" method has not been called for layout page How can i deal with that issue?
This is not a problem with the connections. It sounds like a problem in your layout page. Maybe you're missing the section "#RenderBody()"?
#RenderBody works as a placeholder for the engine to know where to drop the content of the view using the layout page
Here a good explanation of the sections you can/need to use.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have hosted asp.net application on windows 7 64-bit operating system (IIS 6.0).
The problem is I am able to browse some pages of the application while other pages are not opening. Browser response is:
This webpage is not available
These specific pages are using some .pdf files folder and a *.txt file to read and write which are in root directory of application.
Is there anybody that knows what is the thing that I have missed during deployment?
It is like when I hit one page
1) http://xxx.xx.xx.xxx/page1.aspx (webpage working file).
This page reads some gmail inbox and displays result after some manipulation.
2) http://xxx.xx.xx.xxx/page2.aspx (webpage not available).
Second page in same directory does not working. This page is reading/writing some *.pdf files and *.txt files.
Timeout is not problem here.
In your comments you mention transferring to a new host.
There are several possibilities depending on what you are actually doing.
Security. Generally speaking, writing files to the root of your web app is a very bad security issue. If the system is properly configured on the new host then that is likely killing your pages. Actually, writing files anywhere is generally a bad idea unless you have taken the time to configure it and know what you are doing.
PDF/TXT file delivery. The IIS server needs to have it's mime types properly configured in order to deliver those types of files to the browser. If you are linking directly to a file with a .pdf or .txt extension and having a problem then the server might be misconfigured for those.
The best thing to do would be to change your web.config file so that it will give you the actual error message. You can do this by changing the customErrors element to have mode=Off
Note that you might also have to configure your browser to turn off "friendly http errors" if using IE for browsing.
use proper/correct activeX for displaying the PDF (Adobe comes with a free Active X dll (even for Reader) called AcroPDF.dll)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a Asp.net MVC 3 application which I want to give to a user to use without them having to host it in IIS to run.
What I would like to have is some sort of executable that they click or a service which will host the application and then they can use it from any browser on the network.
What are my options?
Have you looked into IIS Hostable Web Core?
This feature basically allows you to host the entire IIS functionality
within your own process. This gives you the power to implement
scenarios where you can customize entirely the functionality that you
want "your Web Server" to expose, as well as control the lifetime of
it without impacting any other application running on the site.
You can look into IIS Express http://learn.iis.net/page.aspx/868/iis-express-overview/ Although it is still IIS it's much lighter weight and might be what you need:
It doesn't run as a service or require administrator user rights to perform most tasks
IIS Express works well with ASP.NET and PHP applications
Multiple users of IIS Express can work independently on the same computer.
If the application is meant for production use, you need to host it under an IIS environment. IIS Express is intended as a development server and not for production use.
Otherwise, IIS Express is the way to go if you want someone else to work on it in a local development environment.
Take a look at the following example.
http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-signalr-20-self-host
http://owin.org/
http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api
http://blog.micic.ch/net/owin-and-razor-enabled-mvc-application-framework
Regards