ASP.NET related error - asp.net

If you could help me with my problem, I'd really appreciate it. I'm unable to open my website in another computer, The following error occurs:
Server Error in '/WebSite2' Application.
An attempt to attach an auto-named database for file C:\Users\evisen\Desktop\Amy the conqueror\WebSite2\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Users\evisen\Desktop\Amy the conqueror\WebSite2\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I hope I've been as specific as I can be. Thank you!

This error generally comes when there is some problem in your connection string. Try to check your connection string.
Also check this related forum. Hope that helps!

Related

Could not load file or assembly 'SharpSvn'

I am using SharpSvn.dll and SharpSvnUI.dll in my project . I am getting error like this
Server Error in '/WebUI' Application.
Could not load file or assembly 'SharpSvn' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load
file or assembly 'SharpSvn' or one of its dependencies. An attempt was
made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'SharpSvn' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Using :
VS 2015 -64bit
ref :
https://sharpsvn.open.collab.net/
You will get this error if you try to host a web application using a 32 bit dll on a 64 bit server.Quick fix is to set "Enable 32 bit applications" flag to true in AppPool Advance Settings for the site.Select the Application Pool used for the application and the set that flag to true.Restart IIS.

SignalR 2 fails on Azure

I deployed an ASP.NET 5 MVC 6 app on Azure, and ran into this problem with SignalR 2:
when starting connection from client, call to
/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B"name"%3A"gameHub"%7D%5D&_=1460028930688
fails with error 500.
The exception behind error 500 is this:
Exception Details:
System.Security.Cryptography.CryptographicException: The data
protection operation was unsuccessful. This may have been caused by
not having the user profile loaded for the current thread's user
context, which may be the case when the thread is impersonating.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[CryptographicException: The data protection operation was
unsuccessful. This may have been caused by not having the user
profile loaded for the current thread's user context, which may be the
case when the thread is impersonating.]
I read and tried solution suggested at SignalR CryptographicException on AzureWebsites, but id didn't work for me.
As I understand, Azure doesn't allow LoadUserProfile.
Any workaround?
I had the same problem and my fix was to add a call to UseAesDataProtectorProvider() before my call to MapSignalR(). Hope this helps someone.

Report Viewer after deploying on server

An error occurred during local report processing.
The definition of the report 'D:\Inetpub\Vhosts\skyhighindustries.net\httpdocs\Sky\Report3.rdlc' is invalid.
An unexpected error occurred in Report Processing.
Access to the path 'D:\temp\expression_host_7fc1e8bf42474ccfb1dbd1c05ceaa6e5.dll' is denied.
Please help i m getting this error after deploying my report on server
Make sure that the identity that your application is using in IIS has at least browser access to your reporting services instance.

Me.ChangeSet.GetOriginal, Object reference not set to an instance of an object

hey , I have a problem with updating a record using a domain service, entity framework and asp.net.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 257: }
Line 258: Me.ObjectContext.OrderStatusHistories.AddObject(_orderStatusHistory)
Line 259: Me.ObjectContext.Orders.AttachAsModified(currentOrder, Me.ChangeSet.GetOriginal(currentOrder))
Line 260: End Sub
Line 261:
The order is commited in the database, does anyone know whats going on here?
Turns out the changeset was null. So in my code added an if changeset is not null, i dont need to run the code if there isnt a changeset.

How can I solve this issue: "System resource exceeded"?

I'm using Access as a database in my asp.net project and I'm facing this error:
System resource exceeded.
Please guide me how to resolve this issue.
In your code somehow, connection to database keeps open and you reach the limit. Same question asked here :
OleDbException System Resources Exceeded

Resources