Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to configure net for virtual host

Shulou Source: shulou.com Published: 2022-06-02 02:06:16 10月03日 Update

Today, I will talk to you about how to configure net for virtual hosts. Many people may not know much about it. In order to let everyone know more, Xiaobian summarized the following contents for everyone. I hope everyone can gain something according to this article.

This article is about deploying ASP.NET membership on a virtual host. It is compiled according to the sharing of cloud community authors for everyone to learn and refer to.

Because ASP.NET membership uses dbo users to access the database by default, deploying membership to a virtual host usually results in an item that cannot be accessed, causing the membership to fail to work properly. The following describes how to solve this problem.

1. When establishing the membership database on the virtual space (the basic virtual host sql server database will not provide dbo users), all [dbo]. and dbo., so that when the membership database is built, all objects will be created using the current connection user.

2. Download the membership source code from microsoft. After default installation (recommended), you can find the source project under C:Program FilesASP. NET Provider Toolkit SQL Samples, add the project to your solution, and reference the project in the project you need to use.

3. Rewrite membership, remove dbo. from all source code in memeorship project, and regenerate membership project. At this time, a ProviderToolkitSampleProviders.dll file will be generated under the bin directory of your project.

The membership section in the web.config file is as follows:

Tags: Project data database host virtual host content user configuration file build location author item object regular meeting solution is in more source code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei Xiaomi Redmi Shulou Technology