I've put my site online and I'm looking to add/change user membership. From Visual Studio, I can access the Website Administration Tool WSAT and it's great if you just want to add users manually. Is there a similar way to change users once the site is hosted on a remote server?
For the moment, I change the user information through the WSAT and re-FTP the mdf file; it's pretty painful. Let me know if there's a better way.
Thanks.
I believe there are only two options.
If you have control of the server
you can enable access to the WSAT on
the server.
Code up your own little management system.
Here's a link that covers both in a little more depth. That link also references the 4guysfromrolla.com tutorial which, while dated, is still relevant.
Related
I want to put restriction like certain Regions, Cities and Countries should not be able to access my website. I came across some concept like GeoFencing, but I guess that can only be implemented on Windows Phones Or Windows 10. I came across few free APIs that would return me my client's location details.
I am working with Visual Studio 2015.
I also came across HTML5 GoeLocation, it is will ask user for permission to allow website to know his/her location; which is not good enough for me.
I want to know, what are other better choices or solutions we can look into?
Also, since I am using IIS server for deployment, can I use .htaccess in my case?
I have came across this IPSecurity configuration at server level. Is this a viable option? Has anyone tried it?
TIA
There are things you can try to do to find out the location of the user.
As you already found you can request their location from their browser, but that requires asking their permission, and it can be unreliable.
The location can be manually set, and in the case of desktop computers it's unlikely the computer has a GPS attached to provide a good location.
Another option is to look up thier IP in a geoip database: GeoIP2 City Database Demo
There does appear to be a GeoIP module for IIS 7+, but I haven't tried it personally: IIS7 Geoblock Module
But, these methods are unreliable and can give indeterminate, or even flat out wrong results.
The user can decline to provide their browser location, or the user can set their browser location to be the other side of the world.
And what IP is the user using? What about if they use a VPN? Now you have the geolocation for the VPNs IP.
The real answer is that you can't reliably find out where the end user is.
.htaccess
.htaccess is one of the ways Apache allows configuring security.
IIS uses different configuration methods.
Both IIS and Apache require 3rd party modules to restrict access based on geolocation, it's not something provided as standard.
I'm following this guide and it seems to differ from what I see on my computer.
In the image where I'm supposed to pick the type, I select MVC but on my machine, I see addition options (about Azure, besides the authentication). I leave it be as it is. After that, I get the image below and it's not mentioned by the guide at all.
I'm signed in and I'm picking a name for the web site. However, the part that I'm unsure of is the database server option. I can only pick No database or New server but I want to use the one that I already have, one that's got a database that I'm using in another project (non-MVC).
How should I handle this discrepancy? Am I using a substandard guide?
this option is visible for you because you have a superior Visual Studio Update, but, simply, you can uncheck this a go ahead, this check in mean to create a web site or virtual machine to publish your site in Microsoft Azure, but is only an option (you need an Azure subscription), if your check this option and select for example the individual user accounts for security, you need a database, and Azure mean that you have an Azure Sql Database (this is not the only option that you can use).
If you want to follow the guide, simply, uncheck the option Host in the cloud and go ahead an learn MVC!
I'm trying to figure out the membership module in asp.net.
Currently i have a site that i have programmed on my computer, i'm using the asp.net membership and regestering users through the asp.net configureation. So all the data is on my computer.
Now i want to install the web site and all the users in the membership table to a hosting server.
I know i have to get the membership tables to that server, whats the best way to move the site to the server so all will work ?
Do i have to run aspnet_regsql on the server itself to make all the tables.
Is it better to program the site on the server from the beginning so i dont have to move the whole lot.
Can i access the ASP.NET Configuration when the site is on a hosting server ?
The best way to do it would be to make a backup of your database on your development computer and then restore it onto the hosted computer as your database. Your hosting company should give you a way to do this. By doing it that way you will be copying over all of the tables, procedures, and any other DB objects created by aspnet_regsql and any users or login information you already created.
The one change you will need to make is in you web.config file. The web.config file should have the connection string you are using to connect your website to the database and that will need to change so that it connects to your database at your hosting company. Check with the FAQ of your host and they will probably tell you what the connection string should be.
If your host is different than that please post who you are hosting with and what type of plan you have so we have some idea of what to look at.
Your comment about sharing code is a completely different topic. I think I can send you in the right direction though. Check out http://github.com or https://www.mercurial-scm.org/. git and Mercurial are both distributed version control. That is the best way to share code for remote teams (even non-remote). Then you would just push your code from your source control to your site whenever you want to make updates.
I'm going to sound like a complete newbie here but here goes...
I've just signed up for a Windows Azure account and was hoping to get a simple hello world aspx page up and running in a browser to see how it all works but I can't seem to find a simple guide to getting a very simple web application running.
I've got as far as setting up a "service" and going onto the "deploy" page but it's asking me upload an "application package".
I've looked on MSDN but there aren't any simple guides, just reams of documentation talking about "roles" and "development fabric". For somebody that is proficient in HTML/CSS and knows a little abit about asp.net it may just as well be in another language.
So, does anybody know how to upload a simple aspx page and then access it in a browser?
Jon
Make sure you're careful with your app as well. Leaving a simple HelloWorld app running 24/7 for 1 month could cost you approx $85 in fees.
($0.12/hr x 24hr x 30days = $86.40)
http://www.microsoft.com/windowsazure/pricing/
Does this guide help you? It seems pretty detailed for what you're looking for.
Note: When you're looking at helping documentation, I strongly urge you to focus mostly on documentation/posts dated AFTER November, 2009. It was about then that Microsoft made and released some major changes to Azure. Anything older than that might be outdated and unhelpful.
Download and install
1. Windows Azure SDK: http://go.microsoft.com/fwlink/?LinkID=130232
2. Windows Azure Tools for Visual Studio: http://go.microsoft.com/fwlink/?LinkId=128752
Request a Token: http://www.microsoft.com/azure
After getting the token create an application: https://lx.azure.microsoft.com
Open visual studio: new –> project –> Cloud Services –> Web Cloud Service
Write hello world code in the Default.aspx page (be creative)
Right click on your Service project (Not the _WebRole) and select publish.
Select Deploy and Upload you package and configurations
Select Run.
This from Rimon
http://blogs.msdn.com/rimontadros/archive/2009/04/17/windows-azure-hello-world-application-in-8-steps.aspx
An application package is simply an encrypted zip of your project here is a good guide to get you started.
Looks like others have covered things quite well. I just want to add two blog posts that I put up recently, specifically related to managing your account and understanding the true cost of web roles and worker roles:
First: How to correctly set up your account to use the MSDN Premium offering (assuming you have an MSDN Premium account.
Next: The true cost of web and worker roles. This one post could save you a LOT of money. Andrew Lewis already pointed you to the pricing, but this post will illustrate how costs accrue even when your app is not running.
I found that the Windows Azure Platform Training Kit was pretty helpful when I was getting started. It is simple step by step hands on stuff.
I finished my very first C# project in VS 2008 and it is working well now. But now I need to publish this project onto my new website. This project is a web application that interacts with my SQL Server 2008 Adventureworks database on this same computer(XP Professional OS). I am running IIS 6.0 Manager, but I am a newbie to both IIS 6.0 and VS 2008.
I began by right-clicking the application in VS and selecting "Publish", but I've just selected File System, cause choosing Local IIS forces me to enter Username and password.
The problem is that I can't open this website from IIS without it prompting me for username and password. I have modified machine.config file several times in the processModel section, by setting username="D610-M\ASPNET", password="AutoGenerate". But this makes me enter built-in password when I try to view it. And I don't know what built-in ASPNET password is. When I cancel this password popup, it returns:
HTTP 401.1 "You are not authorized to
view this page."
And I've reset the ASPNET password several times. First I tried setting it to a password I knew, then I ran the aspnet_regiis command to reinitialize it. I also tried substituting other usernames and passwords, but none of them have worked. I even tried entering "SYSTEM" for username and AutoGenerate password, but even this prompts me to enter password. I have added the ASPNET user Read/Write/List permissions to all relevant folders. And I tried to create a new website pointing to http://localhost/[AppName], but this forces me to enter password. So no getting around that password.
I have modified Properties for Default Website in IIS: Home Directory pointing to my application in VS 2008 folder and Application Protection = Low. On Directory Security tab, I set username to D610-M\IUSR_D610-M and I checked "Enable anonymous access." I unchecked the Allow IIS to control password.
And I have read alot of MS URL's and other websites to see if I could answer these problems myself, but none of their helps worked either. This should be simple. I'm just trying to add my web application to my website. I know that my website works cause I installed a default website with basic HTML and it works.
What else can I try in order to add this web app to my website?
One important limitation to remember is that you are only allowed one website on IIS6 on XP.
If you have edited your machine.config you have introduced too many new variables into the equation to properly troubleshoot the problem (not that editing machine.config in itself is harmful, but it's an indication that there's a bit of shotgun approach to the problem).
You need to start out by wiping your slate clean and making sure that you have an otherwise working system. Browsing an HTML page does not prove much as running HTML and running ASP.NET are like apples and bicycles.
The best that I know of for doing this is uninstalling and reinstalling IIS and whatever .NET framework you are on. If you are on 3.5 you should do this for both two and three point five. If you can you need to put machine.config and every version of web.config (except the one in your web app itself) back to their defaults. There is nothing there you should need to edit run an ordinary ASP.NET app.
Once you think you have a tabla rasa and can browse an html page, then change its extension to .aspx and see if you can still browse it.
My last suggestion for today is:
As a poster above said set your ACLs on the folder where your website is (typically c:\inetpub\wwwroot) so that the group "Everyone" has "Full Access". Don't leave it this way, even on your own machine, but it takes file permissions out of the equation. If you are still having problems let me know, but basically you need to start from a "known good" state if you ever hope to get this problem resolved.
I am not sure if this is it, but.... I have seen this error myself and it is usually caused by not having the ASP.NET version set to 2.0 in your Website properties under the ASP.NET tab. This setting is often defaulted to ASP.NET 1.1 which would cause this error to occur. Note, that even though you are using Visual Studio 2008 the ASP.NET Version is still needs to be 2.0 in IIS. I would double check this setting.
Usually, I recommend the initial build to be to a location in C:\ (example being C:\MyFirstApplication). You also need to make sure the "Network Service" has permissions to that folder. Placing the application in the projects (or whatever) folder in your personal documents list is asking for permissions and access issues. Try that and see if it works!
You need to set root level folder permissions on your web site. Navigate to the folder that holds your web site, right click, permissions, security tab. Make sure that you have asp.net, anonymous user, Internet Guest Account (computer\iuser_{something}) and network service in the allowed roles.
As an aside I suggest that you pre-compile your site before posting it to your web server. This is a security precaution and a performance booster. Getting into this habit will be a good thing for you in the long run. It keeps people from tweaking the code on the server. There is a good utility here to make this easier: http://www.west-wind.com/tools/aspnetcompiler.asp
I believe this is pretty much the same as the question posed by him earlier here