Announcement Announcement Module
Collapse

myhosting.com Forum Guidelines

Welcome to the myhosting.com Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other myhosting.com Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
How do I make myhosting sql server my default provider? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I make myhosting sql server my default provider?

    I am trying to setup my myhosting sql server as my default provider. what am I doing wrong? I keep getting this as an error.

    "This configured users could not be displayed because the default provider is not a trusted provider"

    <connectionStrings>
    <clear />
    <add connectionString="Server=sqlhosting02.myhosting.co m;Database=User_xx;User ID=User_xxxxx;Password=xxx" name="xxxx" providerName="System.Data.SqlClient" />
    </connectionStrings>

    <membership defaultProvider="LocalSqlServer">
    <providers>
    <clear />
    <add name="LocalSqlServer" type="System.Web.Security.SqlMembershipProvider" connectionStringName="XXXXXXX" enablePasswordReset="true" enablePasswordRetrieval="true" passwordFormat="Encrypted" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" />
    </providers>
    </membership>

    thanks!!

  • #2
    Re: How do I make myhosting sql server my default provider?

    this forum is dead isn't it? :cry:

    Comment


    • #3
      Re: How do I make myhosting sql server my default provider?

      Sorry for the delay in responding! We noticed that in your connection string you have Database=User_xx, but it should be Database=DB_xx. Can you double-check your connection string to make sure it looks like this?

      Originally posted by kinane3
      <connectionStrings>
      <clear />
      <add connectionString="Server=sqlhosting02.myhosting.co m;Database=DB_xxxxx;User ID=User_xxxxx;Password=xxx" name="xxxx" providerName="System.Data.SqlClient" />
      </connectionStrings>

      Comment


      • #4
        Re: How do I make myhosting sql server my default provider?

        I did notice that too and fixed it. I'm making a connection now...however, when using the IIS7 manager I still get this error when viewing the .Net Users utility. the error reads...

        "this feature cannot be used because the default provider type could not be determined to check whether it is a trusted provider. You can use this feature only when the default provider is a trusted provider. If you are a server administrator, you can make a provider by adding the provider type to the trusted providers list in the Administration.config file. The provider had to be strongly typed and added to the GAC (Global Assembly Cache)."

        Comment


        • #5
          Re: How do I make myhosting sql server my default provider?

          Here are some further suggestions:
          I do not recognize the System.Web.Security.SqlMembershipProvider information. Try using the following in the web.config file.

          Code:
          <configuration>
                          <appSettings>
                                          <add key="MyConnectionString" value="Persist Security Info=True;User ID=User_xxxx;Password=*********;Initial Catalog=DB_xxxx;Data Source=sqlhosting02.myhosting.com "/>
                          </appSettings>
          <connectionStrings>
          Then use it the following way.

          Code:
          Dim myConnection As System.Data.SqlClient.SqlConnection
          myConnection = New System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings("MyConnectionString "))
          myConnection.Open()
          
          Dim MySqlCommand As New System.Data.SqlClient.SqlCommand
          MySqlCommand.Connection = myConnection
          MySqlCommand.CommandType = System.Data.CommandType.Text 
          MySqlCommand.CommandText = "SELECT * FROM MyTable"
          
          Dim MyReader As System.Data.SqlClient.SqlDataReader
          MyReader = MySqlCommand.ExecuteReader()
          
          Do While MyReader.Read()
                          Response.Write(MyReader.Item("MyColumn"))
          Loop
          
          MyReader.Close()

          Comment


          • #6
            Re: How do I make myhosting sql server my default provider?

            Also, here is some suggested further reading: http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

            LocalSqlServer points to the ASPNETDB database in the App_Data folder. You will need to use CustomizedProvider. The web.config will look like this:

            Code:
            <configuration>
              <connectionStrings>
                 <add name="MyConnectionString" connectionString="Persist Security Info=True;User ID=User_xxxx;Password=*********;Initial Catalog=DB_xxxx;Data Source=sqlhosting02.myhosting.com" />
              </connectionStrings>
              <system.web>
            
                <membership defaultProvider="CustomizedProvider">
                  <providers>
                     <add name="CustomizedProvider"
                          type="System.Web.Security.SqlMembershipProvider"  
                          connectionStringName="MyConnectionString"
                          applicationName="MyApplication"
                          enablePasswordReset="true"
                          enablePasswordRetrieval="true"
                          passwordFormat="Encrypted"
                          requiresQuestionAndAnswer="true"
                          requiresUniqueEmail="true"
                  </providers>
                </membership>
              </system.web>
            </configuration>
            Hope this helps.

            Comment


            • #7
              Re: How do I make myhosting sql server my default provider?

              this is what I'm doing with the provider..

              Code:
              <membership defaultProvider="LocalSqlServer">
                          <providers>
                              <clear />
                              <add name="LocalSqlServer" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" />
                          </providers>
                      </membership>
              it seems to be working, I can create a user successfully with my full version myhosting sql server. the error I'm referring to it coming from the IIS7 manager itself. at the moment I suppose it isn't cause a functional problem but I'm wondering if it will in the future as I develop further.

              thanks!

              Comment


              • #8
                Re: How do I make myhosting sql server my default provider?

                I am getting the same error.... Microsoft says this...

                http://www.iis.net/ConfigReference/syst ... viders/add

                However, looking at the support site- it seems that this feature is not actually supported the way IIS7 intended...

                http://wiki.myhosting.com/ASP.NET_Forms_Authentication

                -- Edit

                So I took a look at the "application" that's provided- and it clearly doesn't use the IIS7.0 ASP_* tables.. it's using a custom XML file. Doesn't look like there's any group support, standard in IIS7's built in forms authentication- also not sure it will actually work to secure non asp.net content, as intended by the IIS 7.0 architecture....

                -- Edit 2

                It seems that the problem here relates to the first IIS.net link provided above. The sites "inherit" 2 user providers = MySQLMembershipProvider and AspNetSqlMembershipProvider. If you want to change properties of these providers at all, it somehow becomes "untrusted", even if the type is System.Web.Security.SqlMembershipProvider

                This is a problem for me- as I do NOT want to require email addresses- or password reminder strings- or anything like that. but it's 'on' with the inherited provider.

                -- Edit 3
                Yes I know- but this might help someone....
                Ok- I fixed this for SQL server- When you create the custom provider you need to put this as the type:

                Code:
                				  type="System.Web.Security.SqlMembershipProvider,
                							System.Web, Version=2.0.3600.0, Culture=neutral,
                							PublicKeyToken=b03f5f7f11d50a3a"
                You would need to check what all the information you need to get it to work with the MySQLMembershipProvider

                Comment


                • #9
                  Re: How do I make myhosting sql server my default provider?

                  Hello Hal,

                  Seems like you may have found your solution. It's all a bit over my head but if you still need help, reply here and I'll try to find some for you.

                  Thanks,

                  Comment

                  Working...
                  X