mvc4 vs2010 iis7 - set server auhentication - c#

so my problem Erises as i refuse to advance nor to vs2012/15 nor to mvc 6 i think is the latest and nor using EF... well latest.
as the configuration i am in :
windows 7 .net 4.03... mvc4 iis7
i have a problem adding a new website/application so i could simply publish using built-in arrangement via vs2010... instead..as i did with webforms(my till now approach) copying source to wwwroot by my self.
so the issue is i can not find any article /tutorial to set it correctly as the guidance is to set via web platform referencing this age of versions is via using older Wplatform that has Install Web Deploy - via using option in list "Recommended Server Configuration for Web Hosting Providers" which does not exist in current wplatform...
update i forgot to mention i did not want to set any kind of athuresation till i know what will be the effect and what problems in connectivity to the application it will apply from other hand how easy will it be to hack even via spoofing no sweat

as it seems the problem till now was the access permit to the folder of the project i suggest to not use the vs studio as the folder of the project but to make a copy on a normal directory otherwise u need to set user as the user of iis asp.net iis/nameofpool and give it a read right ...full rights accessing the folder.

Related

Is it possible to edit a project once is published on Azure?

I'm testing an application I just published using the free option that Azure gives us.
In this process I found out that I need to make a change to a Controller (ASP.NET Core 2.0) and I've been looking for the options to do so.
I've encountered with Azure App Service Editor and I'm reading some documentation about it. However, it does not seem the way to do this kind of change since I can't access the *.cs files thru this service. This is the list of files that are shown:
So, my question is:
Is there a way to edit these files (controllers, views) with Azure App Service Editor?
If no, what would be the way to reflect this changes on my already published application? Also, in the case the answer is "republish the project", is it possible to do so without alter the information contained in the database that has been added during this test process and only update the modified files?
I apoligize if these questions are very basic but I'm just getting started to know about Azure. Thanks in advance.
How I publish it:
In order to publish this project I used the option Visual Studio gives us:
Now, if I go to the same option, this windows shows up:
Question: If I hit the 'Publish' button I believe it will republish, the whole project, correct (the database included)? If this is the case, I believe there will be conflicts about the databases, since I have already information in the project published and other information in the local project. Is it possible to reflect the update for everything but the databases?
No, you can't update the files there as this is a compiled web app, so you have to publish the update.
I'm assuming you're using EntityFramework and originally publishing the database via the web publish.
If you click "settings" on the publish dialogue, on the second page (settings tab) you'll see the options for publishing the database.
Here you'll see options as to whether to update the database during deployment, this I believe is to apply migrations. But if you uncheck these it should not update your database at all.
You should verify this after saving the publish by looking at the generated publish profile (you don't have to do a publish to see this)
It will be located at "YourApp\Properties\PublishProfiles" and should have been added to your solution, and will be called something like "Your App - Web Deploy.pubxml"
Within this you will see a <PublishDatabaseSettings> section, where the Enabled properties should be set to False
However I would advice that before publishing any update:
Test the deployment to a new server
Back up the database before deploying and test you can restore from it.

How to deploy an ASP.NET application to localhost using IIS?

I'm trying to deploy an ASP.NET application to localhost using IIS, I've been reading a LOT of tutorials and following them step by step but I just can't seem to make it work...
I created an Application Pool(TestPool) with .NET version 4.0 and gave it every permission to the folder where the application is at.
I then added an application to the Default Web Site and tried to run it at
http://localhost/TestApplication/
But I keep getting:
Any idea what is wrong and how can I solve this?
Versions:
IIS version: 6.2
OS: Windows 8.1
VS 2013 Ultimate: 12.0
VS .NET: 4.6
PS: It's my first attempt at deploying an ASP.NET application so if you need any further information just leave a comment.
EDIT:
It is now running at least thanks to Julian and Marge, but when I run it using VS it has the default view, why isn't it showing when I run it through IIS? When running through IIS it just lists the files:
This error is because your website, in the IIS Server, does not have the Directory Browsing enabled and the default document (default page of the site ex: Default.aspx) configured.
Go to IIS Server IIS > Default Documents and check if the default page of your site is listed, if no, add the page.
Check the related link:
https://support.microsoft.com/en-us/kb/942062
Generally speaking, you do not need to access IIS manager at all to run your webpage on localhost. All what you need to do is right click on the project and then choose properties. In the Web tab you will find Servers section. Make sure the Project Url is something like http://localhost/myproj or simply http://localhost/ then hit Create Virtual Directory. Your webpage should be up by then, and you can access it either in debug mode, or simply by navigating your browser to the Project Url you have chosen.
When you add web application in IIS ex.
That your hostname should be to add in host file which is C:\Windows\System32\drivers\etc"\hosts
ex.
127.0.0.1 test.pln

deploy asp.net project as executable

I'm planning on creating some sort of "media-manager".
Add your bluray/dvd collection and it downloads metadata and lists your collection in a nice way and so on.
It's supposed to run on a NAS/Homeserver running Windows 8 and i want to access it via a webinterface.
ASP.NET using Web-Api seems like a good way to go.
However, it would be great to deploy the website as an executable.
For example: A friend want's to use the application too. I give him an installer and afterwards, he just needs to doubleclick the .exe and a webserver (IIS Express?) and the website boot up automatically.
Is this possible? (and if, how?)
Thanks
Well, of course you could write an installer that installs a webserver (like casini) and then install the Website to this Server and all is installed locally but I don't recommend that. That installer Need more work then the Website.
You are better of with Hosting you Website in a public place like Windows azure and implement your Website in a way that a user can logon and sees it's DVDs. Another users sees other DVDs. Or give him Access to your homeserver with dyndns.
Yes you can add a "Web Setup" project in your asp project to build a msi package and custom what do you want step by step .
This will generate a "installWebSite.msi" file at the end. Just double click it and follow the website installation
You can see a good presentation here ->
http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx

Deployment of asp.net web on IIS 7

I am going to deploy my asp.net web on IIS 7. For this purpose I have googled and found a tutorial link. I followed all the steps and then run the web, in the result web is not running, its not showing its asp.net page instead of this it is showing directory listing of my web.
When I run the web through visual studio the default page in browser is http://localhost:58276/Home/LogIn?ReturnUrl=%2f
Normally, IIs looks for a certain type of file names that it considers are entry file names.
Usually the start page for ASP.NET applications is Default.apsx.
(You can check that in the IIs manager -> Default Document.
Check that your start page has that name.
You should check the start page as #Magnus Johansson mentioned; if that's not the problem, it might be that you're targeting the wrong ASP.NET version.
Did you specify ASP.NET 4.0 for your Application Pool? If you created your own application pool, you should open up the configuration for it and make sure it's set to .NET Framework v.4.0.
If that's not an option for your application pool, you might not have ASP.NET 4.0 set up on your system (which can happen if you install the .NET Framework 4 before you install IIS 7). If that's the case, you may need to run aspnet_regiis: http://msdn.microsoft.com/en-us/library/ie/k6h9cz8h.aspx. (The set of options you want is probably aspnet_regiis -i)

How can I deploy an asp.net application using Visual Studio 2008

I am trying to publish a website using IIS, I made a virtual directory and in this directory I've added all the webpages and configured the virtual directory but still I am not able to run my web application.
Here is the step by step method to deploy an asp.net application
http://www.15seconds.com/issue/030806.htm
Please post any error message
Make sure that your are running the right asp.net Version...
check if in the asp.net tab if it's v 1 change it to v2
Could you please let me know the error message.( Check with minimum settings like startUp page , version, try publishing with Wizards etc)
In Visual studio, click on project, Properties, Web.
Under Servers, select Use local IIS Web server, then on Create virtual Directory.
Now, when you debug, the page should open in IIS, and Visual studio has taken care of most of the grudge work of setting up the IIS, all you will probably have to change is the security settings under IIS. Hope this helps.
If it is IIS7 check that your application has enough permissions to run:
IIS Actions Pane:
Basic Settings
Connect as (be sure to log in with Admin account first to test, then create you own specific user. Least Privilege Principle)
Test Settings (Authorization and Authentication is Green!)
Test your webisite
The question doesn't say what exactly the error is but you mentioned that you just created the virtual directory. Did you make it an web application? For IIS 6 follow this
link - Create and Configure Local ASP.NET Web Sites. In IIS7 just right click on it and convert it to application.
If its already a website, did you choose the correct framework? normally when you create a website it ill be assigned the default app-pool. If you have installed multiple dotnet then you might check which framework is in default app-pool. Then change the default app-pool to the correct version that is required by your website, or create a new app-pool.
There can be multiple reasons so if you could provide the error message then it would be easier to resolve the problem.
Thanks.

Categories

Resources