Asp.net Connection database problems, set up favorites site, set home page, asp.net favorites site
SQL Server 2008 Failed to append the database: The physical file cannot be opened and access is denied. solution:
The physical file "E: \ SQLDATA \ EMSXDB. mdf" cannot be opened ". Operating System Error 5: "5 (Access denied .) ". (Microsoft SQL Server, error: 5120)
This is caused by permission issues. There are two solutions: one is to move the mdf and ldf files to the database data directory (for example, D: \ Program Files \ Microsoft SQL Server \ MSSQL10_50.MSSQLSERVER \ MSSQL \ DATA) and then attach. The second is to change the MSSQLSERVER service logon identity to a local system account.
In the past, win8.1 can be used for attaching directly. Now, there are many problems when using the win10 preview version.
Add this site to favorites and set it to the Home Page
<A href = "javascript: void (0);" id = "setHomePage" onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('your homepage'); return (false); "style =" behavior: url (# default # homepage); "> set as homepage </a>
<Span style = "CURSOR: hand" onclick = "window. external. addFavorite ('', 'My website') "> Add to favorites </span>
<A href = "javascript: void (0)" onclick = "SetHome (this, window. location)"> set as homepage </a>
<A href = "javascript: void (0)" onclick = "AddFavorite (window. location, document. title)"> Add to favorites </a>
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head> <title>
Set as homepage and add to favorites
</Title>
<Script type = "text/javascript" language = "javascript">
Function AddFavorite (sURL, sTitle)
{
Try
{
Window. external. addFavorite (sURL, sTitle );
}
Catch (e)
{
Try
{
Window. sidebar. addPanel (sTitle, sURL ,"");
}
Catch (e)
{
Alert ("failed to add to favorites, please add with Ctrl + D ");
}
}
}
Function SetHome (obj, vrl)
{
Try
{
Obj. style. behavior = 'url (# default # homepage) '; obj. setHomePage (vrl );
}
Catch (e ){
If (window. netscape ){
Try {
Netscape. security. PrivilegeManager. enablePrivilege ("UniversalXPConnect ");
}
Catch (e ){
Alert ("this operation is rejected by the browser! \ N enter "about: config" in the address bar of the browser, press enter \ n, and set [signed. applets. codebase_principal_support] To 'true '");
}
Var prefs = Components. classes ['@ mozilla.org/preferences-service%1'}.getservice (Components. interfaces. nsIPrefBranch );
Prefs. setCharPref ('browser. startup. homepage', vrl );
}
}
}
</Script>
</Head>
<Body>
<Div>
<A href = "javascript: void (0)" onclick = "SetHome (this, window. location)"> set as homepage </a>
<A href = "javascript: void (0)" onclick = "AddFavorite (window. location, document. title)"> Add to favorites </a>
</Div>
</Body>
</Html>
It is a reference, hoping to help people who need it.