I'm trying to deploy an application with Sql Compact Server 3.5 but I get an error when I try to deploy it on another pc for any database request. Indeed, the deployment works on my dev computer.
The error is a NullReferenceException on :
System.Data.SqlServerCe.SqlCeException.ToString()
But I've already followed the instructions on this link :
http://msdn.microsoft.com/en-us/library/vstudio/aa983326.aspx (the private file–based deployment)
And I'm sure that I'm using the correct dll for my 32 bits application.
What could be my problem?
Thank you for any help.
Related
Why cant i debug my project on iis express server? i always get the following error :An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more error occured
error when running
I got tis error for 2 weeks now and have not been able to solve this. I have reinstalled visual studio multiple time, iis server and even reinstalled windows completely.
but still no change. Other solution like setting up the ssl certificat also dont work.
I use a dell precision 7510 with windows 10 enterprise with endpoint security (its a computer from work)
If anyone knows an answer
thx
I new to ASP.NET development and I have managed to deploy VirtoCommerce to my local machine IIS (windows 8.1) following the documentation on http://docs.virtocommerce.com/display/vc2devguide/Deploy+web+applications+to+dedicated+server .
When I tried to deploy it in Azure VM running Windows server 2012, I got the following error when I tried to run the frontend page. The dll mentioned below is definitely in the /bin folder of the store.
Server Error in '/' Application.
Could not load file or assembly 'LibSass.x64' or one of its dependencies. An attempt was made to load a program with an incorrect format.**
I followed the link
Could not load file or assembly 'LibSass.x64' or one of its dependencies in VirtoCommerce but found no luck. What did I miss on this deployment ? Any help is much appreciated, thank you.
Are you running 64 but machine and IIS Application Pool as 64 bit? If not, make sure to go to IIS and configure pool settings to run as 64 bit process. The easier approach will be to follow the guide here: http://docs.virtocommerce.com/display/vc2devguide/Deploy+from+GitHub+to+Microsoft+Cloud+Azure which will setup Virto Commerce as a website in IIS with all correct configuration for IIS. You can then update it manyally by simply uploading site through FTP if you want. You can also clone the repository on GitHub and that way your azure site will auto update on every checkin.
I was able to reproduce this error on a clean Windows Server 2012 Standard. It turned out that Libsass.Net requires Visual C++ Redistributable Packages for Visual Studio 2013. After installing the vcredist_x64.exe the error has gone.
I've been working on a Windows Service off and on for some time now and I have finally finished it. On my local machine (Win7, 64bit, .NET 4.5, VS 2013), I've been able to successfully install and run the service which takes info from a website and places it in a SQL table.
Now I want to install this service on a different computer on the network, and it has to be this computer because I've been told to do it like this.
The other computer is running 64 bit Windows Server 2003 R2.
My problems arise when I try to install the service. I'm using plain old command prompt because I do not have the VS command prompt. The code is:
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319>InstallUtil.exe C:\MyService.exe
Doing this gives me the error "Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'filepath' or one of its dependencies. An attempt was made to load a program with an incorrect format.."
So I tried doing this instead:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>InstallUtil.exe C:\MyService.exe
Using this 32 bit InstallUtil.exe seemed to work as the service would install successfully and it showed up in my services.msc list. When I try to start the service I then get this error message: "Could not start the service on Local Computer. Error 193: 0xc1"
I'm getting really frustrated/confused with this, so any help what-so-ever would be greatly appreciated!! Thanks for reading.
<---------------------------------------------EDIT---------------------------------------->
I've changed the configuration to Release and Any CPU, copied and pasted it to the server via Network Folder and installed it once again. Still getting the same error.
<---------------------------------------------EDIT---------------------------------------->
The answer is in my post below if anyone is wondering, or are having the same issue I was.
And I've figured it out. Where I was using Windows Server 2003, it tends to like the .NET 4 Framework and where the service was developed in Visual Studio 2013 it defaults to the .NET 4.5 Framework. All I had to do, along with several edits to make the service a bit more efficient, was change the target in the VS project to the .NET 4 Framework and rebuild/reinstall on the server.
It has now started without an issue and is communicating with the SQL server as intended. Big thanks to Hans Passant for pointing me in the right direction, I would more than likely still be in the process of figuring this out. So thanks!!
I'm trying to open a connection to Oracle from c#.
I've seen this error a couple of times on the forums with possible solutions. And these solutions did help me - for a WinForm app.
However, if I take my same coding (that works in WinForms) and I put into an ASP.net application, I get the error in the title.
The command that generates this is:
OracleConnection oc = new OracleConnection(ConnectionString);
Additional information:
I have a reference to Oracle.DataAccess (version 2.111.6.20)
I've copied the required dll's to my bin directory (oci.dll, ociw32.dll, orannzsbb11.dll, oraocci11.dll, oraociicus11.dll, OraOps11w.dll).
These are the same DLL's that are working in WinForms.
This error mostly comes due to the incompatible processor architecture(32bit or 64) of the application and the Oracle ODAC dll that you have added as reference. It might work in the client app but not in the web app because you might be running the Asp.net application in incompatible bit version 32 or 64.
In case if you have hosted the site in IIS you will have to check the bit version IIS is configured to run.
EDIT
If the above solution didnt solve your issue, Check if you have Oracle Client installed in your machine. Some database operations needs at least Oracle Client installation(Oracle Express or Enterprise etc). Not having the installation might throw the same exception.
I have created just a simple web service as a console application. It works fine on my dev machine and even on one of my servers. when I installed it on my production server I keep catching this error
the error that I am catching says
Retrieving the COM class factory for component with CLSID {BF97F9A2-A475-4F26-9B
5B-3A14F02D9824} failed due to the following error: 80040154.
My dev machine is 32 bit windows 7. The Server that it works on is server 2008 64bit, the server that is DOES NOT work on is also server 2008 64 bit.
any idea how to resolve this?
thanks.
Make sure the COM component you are accessing is registered.
See the answer to this post on social.msdn:
The problem was simply that the 3rd party dll required other dlls that were not on the system. So I installed the required (other) dlls and everything is fine.
Check that everything your service needs is properly installed on the server.