2

I have a client server application. The client is an asp.net c# site and the server is simply a command line application in c#. I plan on using .NET remoting to access and expose information that is on the server application and preset it to the user viewing the client.

The server application has user objects that i want to use for authentication with the asp.net login controls etc.

I implemented created a custom class "MyMembershipProvider" which implements MembershipProvider but i'm getting very confused now. What do i do next?

i know i need to update the Web.config with a "membership" node but all the examples i've seen have a reference to a connection string, mine does not need a connection string as it will not be using a database etc.

4

2 回答 2

1

好的,所以我想通了。

我不需要连接字符串或任何东西。我所要做的就是:

<membership defaultProvider="Name of the class that you created that implements the MembershipProvider class">
  <providers>
    <clear/>
    <add
      name="Name of the class that you created that implements the MembershipProvider clas"
      type="fully qualified name of the class that you created that implements the MembershipProvider class" />
  </providers>
</membership>

我终于意识到上面的元素必须在 <system.web> 元素中并且已修复它,感谢您的帮助。

于 2010-03-07T04:26:04.167 回答
0

希望你觉得这篇文章有用。

http://learn.iis.net/page.aspx/528/how-to-use-the-sample-read-only-xml-membership-and-role-providers-with-iis-70/

您需要更好地理解为什么 web.config 需要特定配置,因为这些基于数据库的提供程序有理由在 web.config 中使用连接字符串。然后你知道如何配置你的提供者(没有连接字符串,因为你的不使用数据库)。

于 2010-03-07T03:11:44.067 回答