| |

VerySource

 Forgot password?
 Register
Search
View: 868|Reply: 9

The problem of aspnetdb.mdf in VS ~ Which expert help! !! !!

[Copy link]

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-21 14:30:01
| Show all posts |Read mode
I have the aspnetdb.mdf database in App_Data in my current program, because the contents of this library are not used in the program, and no user management is used. I now want to uninstall it ~ but every time after the program runs, the system Automatically added -_- #, whoever knows how to uninstall will say, thank you ~~~
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-6-28 00:00:01
| Show all posts
Right click to exclude?
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-6-28 09:30:01
| Show all posts
Are controls such as MemberShip or WebPart used?
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-16 12:15:01
| Show all posts
Right-click exclusion is useless, it is automatically added to the right after every run... MemberShip, WebPart and other related controls are not used.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-17 10:15:02
| Show all posts
Modify the Web.config file to delete some related ones.
Reply

Use magic Report

0

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-19 16:15:01
| Show all posts
You should have used functions such as Membership or WebPart, or configured to use these functions in web.config but not actually used on the page. Otherwise, it will not be created automatically. If you don't believe me, you can create a new website and run it.
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-7-19 17:15:01
| Show all posts
Search for the database name, see where it is, delete it
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-23 21:00:01
| Show all posts
The library name has not appeared in the full text, and the keywords of Membership and WebPart have not appeared. In web.config, I only configured the database connection, as follows:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <connectionStrings>
    <add name="***" connectionString="Data Source=**;Initial Catalog=*;Persist Security Info=True;User ID=*;Password=*" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings/>
  <system.web>
   <authentication mode="None"/>
    <customErrors mode="On" defaultRedirect="~/GenericErrorPage.aspx">
      <error statusCode="403" redirect="~/Error.aspx"/>
      <error statusCode="404" redirect="~/GenericErrorPage.aspx"/>
    </customErrors>
    <compilation debug="true"/>
  </system.web>
</configuration>


But the database will be automatically generated! Is there any other function that will affect the automatic generation of this database?
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-7-31 13:15:01
| Show all posts
Finally found the reason, but I just don’t understand why this happens! If anyone knows, just say it~~
Button event code in login control:
    protected void LoginButton_Click(object sender, EventArgs e)
    {
        try
        {
            this.Response.Redirect("~/Default2.aspx", false);
        }
        catch
        {
        }
    }
When the page jumps, an ASPNETDB.MDF database will be automatically generated after refreshing the project directory. But if the try-catch block in the code is removed:
    protected void LoginButton_Click(object sender, EventArgs e)
    {
         this.Response.Redirect("~/Default2.aspx");
    }
In this way, the ASPNETDB.MDF database will not be automatically generated, why is this???
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-8-1 08:15:01
| Show all posts
If it is a normal Button event:
    protected void Button_Click(object sender, EventArgs e)
    {
        this.Response.Redirect("~/Default2.aspx", false);
    }
Then the ASPNETDB.MDF database will not be automatically generated, why is this???
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list