Form Authentication and roles and members on hosted webbspace

Discussion in 'Databases' started by Nyqvist, May 28, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi
    I have found a lot of information about Forms and Authentication but almost all of them cover project on a localhost.


    I use Visual Developer 2008 (CSharp) and have no problem when I work with my localhost to set up user in the admin page but when I work by a ftp link to a webb host provider (discout asp) can I not start any admin page in order to creat users.


    This seems ok, since i guess it can be some kind of security problems but how do You do insteed?


    /Nyqvist


    I am sorry if this is posted in the wrong thread, but I coul't find any security thread and since this is a little about a database....
     
  2. Thanks for that information, but it's still some problem...

    I made a login hompage on my computer but once I copy the files to discount asp.net i run in some problems.

    I only made a fast test with a log in page that did't lead somewhere and made two users (rols admin/user) within the adminpage.

    After I sent it by ftp to my webb space did the login page show.

    I entered wrong password (since a correct one woulf not lead anywere)... after one minute or so did this error appear:
    The same appeared with the correct password.

    First i tought that this happend because i did't finshed my application, but I am not to sure about that.

    I am verey greatful for any help I can get.
    //Mattias

    http://www.atthebasement.net/testplant/


    Server Error in '/testplant' Application.


    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Source Error:





    Code:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
     
  3. ps. I does work at the localhost (my computer)
     
  4. Mattias,


    I just recently went through this awful process. Check out this: http://community.discountasp.net/default.aspx?f=16&m=24938


    Before doing so, there are a lot of posts in this thread - but it would be wise to read through them all...


    The error you are receiving is due to your web.config connection settings. The last post by me on that link above will show you the proper way to enter your connection strings. As noted, please don't blow through that thread and skip to the end - print out that thread, get some coffee, a highlighter, and take notes.


    Hope all works out for you!


    Mike
     
  5. I think i found the problem.

    It seems that my online page does't know that it has been moved from computer to the webb hosting.

    It seems that the paths is still ponting to c:\Documentand....

    But I can't change them, when I try , do I get information that path ~/App_data is not valid but c:\Doc... is?

    I have made this try once I have open the project trough a ftp conection by Visual Web developer 2008.

    Thank your for your time and effort in order to help me

    /Xmatt
     
  6. matte,


    I'm not certain I understand your last post - but that is ok...


    The error you posted is often a result of a configuration setting that lies in your application and/or your instance of sql server. If your dev database is configured for only local connections you can get this. This can be changed in Sql Server Surface Area Configuration tool. BUT, most likely this problem is a result of you using the website administration tool in visual studio. When using this tool, there is a section under security that allows you to configure 'remote connections'. This changes your web.config file to 'forms authentication' as opposed to 'windows authentication'.


    It sounds like you may have stumbled across the answer - if not - research my comments above a little to make sure your dev environment is configured properly.


    ~mike
     
  7. I belive you have right.

    If i look at the provider is the path:



    c:\documentand....\testplant\App_Data\aspnetdb.mdf


    I guess it should be somthing like : ~/App_Data....


    I will try to find where to do a proper setup for myc, Visual web developer express 2008


    /Xmatt
     
  8. myc?

    I'm not entirely surewhat you mean by that... Anyway, here is a step by step from Visual Web Developer. I think this is what you are searching for...

    In VWD Express, open your project.
    On the Menu at the top of VWD Express is a menu option called 'Website'
    Select that, then select the last option in the sub-menu called 'Asp.net Configuration'

    This will open a web browser window titled Asp.net Website Administration Tool
    There is a 'Security' tab. Select it.

    This changes your view. Look towards the lower left corner. There will be a link called 'Select Authentication Type'. Select it.

    There will be two radio buttons - one saying 'from the internet', the other 'from local network'. Make sure 'From the Internet' is selected. Click the Done button in lower right corner.

    If this is not the fix you are looking for - make sure that when you are developing that you use the Properties window on the right side of the VWD Express IDE. When entering paths for files, pages, etc - make sure to use the folder browser dialog. Do not enter absolute paths (C:/somefolder/page.aspx) in your code. If you do so, every link in your site will need to be changed. Make sure that you use relative paths (~/page.aspx). VWD Expresses tools and controls do all the work for you. Visit the help section in VWD EXpress if you have questions regarding hyperlinks/paths.

    Regards,
    Mike
     
  9. I have looked around but can't find anything
    - I have moved the content from the my local computer to Discunt Asp.net by ftp and the copy tool within vwb 2008 but nothing.
    - I have tried to write over the override what I think is the conection string.
    Web.config
    ----------
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&amp;quot;~/App_Data/ASPNETDB.MDF&amp;quot;;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient" />
    ----------
    - I have tried to find the path "c:/Documentand...." but can't find it anywhere
    - I have tried to change the modify the database connection... but when I write ~/App_Data/ but that value can't bli changed..."cant be find", this can't be done for either on the local version or online version.
    - Tried to find any info in the help for vwb help section
    .... a loot of googling.

    any ideas?
    /Nyqvist
     
  10. Hi
    I just added a mssql2005 to my account (www.atthebasement.net).

    Will this help me with my problem?

    I watched the video but It only covered how to create tables.... how will that be usefull... the express adition also created tables.

    As you can guess I'm a little bit of a newbie but I really would like to learn this stuff.

    /M
     
  11. You're on your way to getting this to work. [​IMG]
    Watch some of those ASP.NET videos on how to tie into the Membership Roles that were created in my video.
    More than tables are created by the way, tables, procedures, roles, a lot of work is made easy with that reg tool.
    If the ASP.NET videos don't make it clear enough, downloading a few of the Starter Kits may help.
    You can see in the several of the Starter Kits how these things are coded.
    If it's your new web.config settings you'll need help with just ask here, no problem there.
    Salute,
    Mark

    ASP.NET Videos
    http://asp.net/learn/

    Starter Kits
    http://asp.net/community/projects/
     
  12. Matte,


    yeah, listen to Mark, follow those links. You are definitely getting closer!


    Mike
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page