Why My C# program runs on my Pc but not in other computers? [closed]
I used C# language in visual studio 2008 and some SQL server management databases in my program but here in my computer the program runs well but in other Pcs it just can't be run :( The error is "The application failed initialize property(0Xc0000135). click on OK to terminate the application" Why this error happens ?
Without more details this answer is virtually impossible to answer. Here are a few things to check/try ...
- Run the program on your PC outside of visual studio
- Make your database available on the same network your client PCs are on
- If this is indeed a networked installation, make sure you can ping the server from your client PCs
- Make sure you've enabled remote connections to your database
- Make sure your firewall isn't getting in the way of database connections
If you're still experiencing problems you should consider adding logging of some kind to your application (this is a good thing to do regardless of any problems you're experiencing) so you can find out at what point your application is failing. If you are getting error messages, posting those messages here will help us figure out what the problem is much more quickly. Also, if you can, put some code into your question so we can see what it is you're trying to achieve
make sure your database is available on the network, and change to use sql authorization.
You could go to SQL Management Studio on your local PC. Create a public user account or pub account under security and add public and connect permissions to that given user.
If you are on a domain, and want to use Windows Authentication add the user accounts for the Windows Users to that Database Security. Either option will work.
Are you using WinForms or Web App? For Web apps, verify your sh*t in web.config, and make sure your connection string is legit. Make sure you change your authentication to Windows or Forms, based on what you decide to do.
精彩评论