Asp.net Connection database problems, set up favorites site, set home page, asp.net favorites site

Source: Internet
Author: User
Tags mssqlserver

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.