I have a c# .net VS2010 web application that contains only classic asp files.
What I want to do is convert the web application to a web site to make it easier to manage the classic asp files.
How can I convert from web application to web site? I have researched google and found lots of examples going the other way.
I don't think there's an automated way to do this. You could just create a new website in Visual Studio and copy your files from the web app into this new website. Be sure to go into each and every .aspx/.ascx file and edit the 'Codebehind' attribute so that it reads 'Codefile' (codebehind directive needs to be compiled and thus won't work in an ASP.NET website). You'll also need to delete the Designer/Designer.cs files.
Hopefully you don't have too many files so that this won't be too much of a PITA.
Related
I've acquired a 1&1 Windows Business Hosting which allows to deploy ASP.NET Core applications (so yeah, I have no access to IIS solutions of building as application stuff or that kind of things I've seen in other posts). I wanted to deploy a web and an API in different subfolders within the 1&1 server I've acquired.
What I want to achieve is the following:
Imagine that my domain is https://myDomain. com.
If a user access directly that URL he should see a specific page of the Angular Web App. However, if the called is https://myDomain. com/api/controllerName it should do whatever I have programmed in that controller of the Web API.
I want to have the folder structure something like this:
But it is also valid if I manage to get it like this:
Is any of these two cases even possible to be done? If possible, how I should proceed for being able to do it? I don't have a lot of knowledge in these topics related to web deployment.
What I have managed to do up until now:
If I deploy just the ASP.NET Core Web API outside the subfolder it works with no issues. If I deploy just the ASP.NET Core with Angular outside the subfolder it also works. My issue is that I'm unable to get them both to work at the same time when at least one of them is in a subfolder.
Alternatives on how to achieve this are also welcome!
Thanks in advance :)
You can deploy ASP.NET Core Web API and ASP.NET Core with Angular in two folders as shown in the image below.
These two folders are virtual directories in IIS. If you want to specify which app to access by default, you can modify the rewrite rule in web.config under the wwwroot folder.
I needed some help in understanding how i can get this setup completed. Due to the current setup of the website, we have a "/blog" that is powered by Wordpress PHP. We are looking to upgrade the website with ASP.NET C# for the main website "/" in a Windows Azure server but maintaining "/blog" on a Linux machine.
The service doesn't wish to use sub-domain for the blog in fear of losing too much SEO value that cannot be duplicated.
May i ask how can this be done?
Thanks!
Make the php website a subfolder of your main ASP.NET site as described in Create a Separate Site or Virtual Directory for PHP Content.
See also Can PHP and ASP.Net run together within the same web site in IIS 7.5?
I know this is a very common question and I could find several answers, but I think my situation is a bit different.
So, I have an ASP.NET Website (NOT a web application), built using "Web forms". Its a very simple website which does bunch of REST calls and talks to the SQL Server 2008. Can you please help me finding a step by step guide to deploy the same on Windows Azure using VS 2010? As of now, the website runs fine on a traditional web hosting server.
So far what I am getting are approaches which use MVC (and using ASP.NET web application, not website). I don't think that I should be concerned about MVC at all? Does a website vs. web application aspect make a difference? If yes, do I need to convert the website to web application?
There's a lot of content on web, so I am a bit confused given my condition. Can someone please put me in right direction? Thanks a lot.
You'll need to convert your Website project to an ASP.NET Web Role project, whether you first convert it to a ASP.NET Web Application or not doesn't really matter. The rest of the tutorial you already linked to applies just fine.
There's no need to look at ASP.NET MVC, It's a different technology than web forms, and there's no need to move to it in order to get your site hosted on Azure.
As for your database, unless you host that yourself in a VM-Role or somewhere else (and connect it using Azure Connect), you'll need to convert it to Sql Azure or Azure Table Storage. SQL Azure is largely compatible with SQL Server, but there are a few features which are unsupported.
I have a website solution that is composed of a Silverlight Project and an ASP Site that contains an asmx Webservice.
The Silverlight project calls various methods in the Webservice, and this works fine on my home PC.
When I publish the site (using 123-Reg if that makes a difference), it appears that the Silverlight app is no longer able to call the webservice. I have tried debugging the app by pointing my local version of the site to my published webservice and I get a "policy" issue.
I know that 123 Reg have .Net 3.5 running on their servers, so I would assume that the site should "just work" when I publish it. Am I making a hugely stupid assumption there? Is there anything that I can do to change the "policies" within my app? Or is there another way around what I am trying to do? I need to keep the webservice, as I want for it to be used from other places, and don't really want to duplicate code and create the same methods within the Silverlight project.
Thanks
Soundlike you are hitting a crossdomain issue, though you shouldn't really.
I would stick a clientaccesspolicy.xml in the root of you web server.
There are loads of questions on SO if you need examples or MSDN
I have an existing ASP.NET web application that I'm converting to MVC 1.0. The site started out with one goal. However, over time our sponsors are asking for more functionality and it is obvious that MVC would be our best route due to the new requirements. I've dabbled in MVC over the last couple of months and have a pretty good grasp on it all works. The problem that I'm faced with now is that the meat of our existing web application makes extensive use of a 3rd party tool that only works within ASP.NET WebForms.
The solution that I'm working on is to have two web applications running on the server. The one application would be our existing WebForms app and is solely used to expose the above mentioned 3rd party tool's functionality. The other application will be our main portal that will act as the new site. When the user wishes to interact with the 3rd party tool, I want to be able to load an iFrame on the appropriate Views that links the user to the other application and will then allow them to interact with the WebForms site. Does this sound crazy?
The number 1 problem that I'm faced with right now is how to configure my solution make the MVC application talk to the WebForms application. Every time I run the solution, a different port number is assigned to the two applications and I can't figure out how to configure my iFrame "src" properties correctly. Of course, I can't add the WebForms application to my MVC applictions' References, so I'm stumped!
Any help would be greatly appreciated...
If the port issue is the only problem, you can run both of them in IIS under a fixed virtual application.
But the ASP.NET development server also has the feature to fix the port to a specific number and not randomize it each time.