i have worked on ASP.net Web application in my local host and it worked perfectly, when i move the application folder to the Test server with IIS 8 it worked the first time but every time i modified a page in my local and move it to server i can not see the changes,
when i created ASP.net Web site i dont face any issue with that, can you please provide with the correct way of copy web application to another server?
also i enabled the custom error in webl.config but i am getting another error
any suggestion
thank you
This answer is based on the conversation in comment section.when you are publishing your website you will get three options
Allow this precompiled site to be updatable:Leaving it checked allows you to make certain changes to the .Aspx files after it has been deployed without recompiling (ex = move the position of a control or add some additional HTML markup).
use fixed naming and single page assemblies:Fixed named assemblies provide flexiblity in page level updates. Since each page will have its own named assembly (instead of a random name) it is easy to update the application by just updating the required assembly.that said if you have made changes to single code behind file then you can easily replace particular .dll file on server with your changed .dll file and the site will work.
Disadvantage is the large number of assemblies (difficult to maintain) and also slight performance hit would be there.
enable strong naming on precompiled assemblies:This is primarily for higher security
For more information check this link
Related
I maintain a website written in ASP.NET MVC 5, and hosted in Azure. It's a legacy app that is a real nightmare to maintain, and so I've been asked to start migrating to a new codebase and the ASP.NET Core framework.
Our goals are:
Migrate one page at a time
Don't lose the "F5 debugging" experience in Visual Studio
My initial thought was to use a virtual application/directory, which is supported both in Azure and in IIS Express. The idea is to point, for example, the /Shop page to the new website by using a virtual path. Then when we're ready, move the /Team page and so on. I would add a virtual path for each migrated endpoint until the migration is complete.
To accomplish this I created a new ASP.NET Core project, and I've been trying to edit my applicationhost.config file and trying to start multiple projects from Visual Studio, without luck.
I tried configuring two sites with the same port binding, two apps within a <site> tag and also two virtual directories within an <application>, but I always end up with errors. Either I can't start debugging (Can't connect to IIS Express or The object invoked has disconnected from its clients messages) or I get a 502 error.
I don't even know if this is going to work in Azure, but I know we can't go down this path without proper development experience.
Am I missing some other, better solution? If this is a good solution, is there any way to make this work in Visual Studio?
I would consider creating multiple new websites in Azure, one for each section. Then, as I start working with Shop, for example, I'd leave an almost-empty controller in the original solution, redirecting to your new Sales web site. Using this approach, you can efficiently work with one smaller code base at a time and in the future scale the individual pieces of your site as needed. Please note, that you can host multiple sites within the same app service environment (thus not incurring a lot of extra cost by separating into multiple processes).
Best of luck :-)
We have a public website that is already exposed to the outside, although in reality there's really nothing there. Simply default.htm file with "Coming Soon" text in it. (http://vensuresoftware.com/)
We also have a WebAPI we've put together that we want to add to this website. When I publish locally to my IIS6, it works no problem. It's accessed as http://localhost/HRConnect/api/Claims just fine. I've used PostMan, a C# client, and Javascript AJAX to access this just fine. I can also load it in a browser at that URL, and I get the appropriate default controller and action.
However, I have been totally unable to accomplish this same thing on the website. Ideally I'd like to include it as a Virtual Directory to the http://vensuresoftware.com and access it as http://vensuresoftware.com/HRConnect/api/Claims but I've had zero luck doing so.
I have tried to add it as a Virtual Directory as well as an Application under that specific website, but when I access the URL, all I get is "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
I've ensure the Application pool is correct, with an appropriate user and the pass through connection test succeeds. But I just cannot access the service or the URL.
Any ideas or suggestions at all on what I can try? I'm not sure what else I can include here. Nothing special in IIS, nothing special in the service really. There's only 3 actions in it. As I said, it all works beautifully locally, under localhost though.
IIS 7 doesn't have built-in support for extensionless URLs which causes a lot of headaches trying to get MVC and Web API apps to run. I've gotten it to work using both these options. Pick the one that applies to you.
Install this IIS patch which allows IIS 7 to handle extensionless URLs.
If the patch isn't an option because you're worried about breaking other sites on the server, you can make the Web.config adjustment found in this answer. You'll have to do this for every MVC/Web API app you have running on the server.
I was trying to refresh the file x.css, which is served via a style bundle in mvc. I must add that the bundle optimizations were disabled for development purposes. I tried updating my web.config, restarting IIS and rebuilding the application. But none of this seemed to work. I also tried disabling caching as suggested in this answer:
ASP.NET MVC how to disable automatic caching option?
But the file would stay unaltered. The server finally refreshed the stylesheet after I reran the application multiple times followed by multiple (and I mean many) broswer refreshs. Why did this happen? Is there a better solution to this problem that does not involve renaming the file?
For bundling, the ?v querystring value will change when you update the file. So make sure your scripts have the ?v=... querystring at the end of them.
I am trying to deploy my first ASP.NET application on a server running IIS 7. But I always get an error 404 when trying to open the page. I thought it might be a start page issue, so I entered a direct URL to a .aspx file inside the wwwroot folder, but that got me another 404. Next step was to set a start page in the IIS Manager to a certain .aspx file, which made the page open, but the URL shown didn't include the specific page, and I didn't see my bootstrap navbar (just links that should be inside it) nor my Infragistics components. (To give context, we just upgraded the server to .NET 4.5 this morning, but all other ASP.NET websites in the same or other application pools still work perfectly!).
I then enabled the option to see folder contents in the browser; opening the website then showed me all the files that were supposedly not found, but clicking on them gave me 404 again. For testing purposes I put a .html inside the main folder: that one I could click and open, as well as *.css files or images in subfolders. But as I said above: ASP.NET is installed and working for all the other websites. I checked the MIME things, there is nothing for ASP related files, but neither is there in the working projects. The handler mappings seem to be correct as well.
So what could the reason for this be? I am totally unacquainted with IIS, so I lack any ideas beyond simple googling :/ My guess would be something permission-related (the app pool it's currently in is using pipeline mode: classic; but again, the same as the working stuff) or another dynamic content option I missed. Or - since as soon as I manually define a start page to be one of the .aspx files, I see at least something - it could be related to extensionless URL's? When I manually enter
myservername\myappname\StartPage.aspx
the browser at least shows
myservername\myappname\StartPage
instead. But I can't seem to find an option to change this. Any help is greatly appreciated!
I ran into this issue when I first started working with ASP.NET. I spent hours scratching my head trying to figure out what was the problem. After a fair bit of research this is what solved my problem. I added the flowing code in the web.config file.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"></modules>
</system.webServer>
I have migrated 2 DLLs and an aspx page to an existing web application on a production server. The changes in the file do not show up when I run the web application.
I have restarted the web application, restarted the associated application pool, run iisreset, deleted the Temporary ASP.NET Files. The changes do not show.
I have created a new html file in the root of the application, but it returns a 404 File Not Found error.
In IIS, I right-click the web application and choose Explore just to make sure that I am in the correct directory. I am. I see my updated files there. I can view the text of the aspx page, and my changes are there. My test html file is there.
I have searched StackOverflow, implementing all of the prior solutions I have seen that have fixed other poster's questions. Is there anything else I can do to IIS, the file system, or anything else to get these changes to show?
It sounds like you are not hitting the website that you think you are. Check your bindings and host headers, maybe another site on the server is intercepting the request.