C#应用程序无法在用户计算机上运行 [英] C# application not working on user machine

查看:123
本文介绍了C#应用程序无法在用户计算机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我完成了我的项目,在我的mahine中,它工作得非常好,但是我把它交给了一个朋友来测试它并且它不起作用..

该项目是物理治疗师的CRM,您可以插入,更新,删除患者和其他一些操作,我使用了实体框架。



安装完成后,会创建一个快捷方式,当他运行应用程序时;首先它非常慢,每次更改选项卡时会出现一个弹出错误消息,并显示未处理异常的内容(中止重试忽略),但最奇怪的是,他无法插入病人。简而言之,应用程序的操作远不是它在我的机器中运行的方式..



我使用installshield进行设置,他有.NET framework 4.5,这是一个我的应用程序开发。



任何帮助赞赏..我必须在本周末交付产品..

谢谢。

Hello,

I finish my project and in my mahine it's working excellent, but I gave it to a friend to test it and it's not working..
The project is a CRM for physiotherapists, you can insert,update,delete patients and some other operations, I used the Entity framework for that.

When the installation is complete, a shortcut is created and when he run the app ;first it is very slow and second every time he change a tab a pop up error message appears and says something for unhandled exceptions(abort retry ignore), but the most strange it is that he cannot insert a patient. in a nutshell the application's operation it's far from how it's operate in my machine..

I used installshield to make the setup and he has .NET framework 4.5 which is the one my app developed in.

any help appreciated..I have to deliver the product at the end of the week..
thanks.

推荐答案

从那个小的,我们无法回答你的问题,甚至开始。

首先查看你的错误:他们通常给出一条信息,这就是问题的重要线索:让他给你发一个实际错误框的截图。



问题是有很多原因导致这种情况发生:很明显,你的软件并没有试图发现任何问题并在内部处理它们,所以它几乎可以是任何东西,从缺少数据库到手指麻烦。但除非你看一下这些消息(通常包括行引用,文件名和堆栈跟踪),否则根本就没人知道。



给你的初学者。
From that little, we can't answer your question, or even begin to.
Start by looking at your errors: they normally give a message which meant as a big clue as to what the problem is: get him to send you a screenshot of the actual error box.

The problem is that there are so many reasons why this could be occurring: it's clear that your software doesn't try to catch any problems and deal with them internally, so it could be almost anything, from a missing database to finger trouble. But unless you look at the messages (which often include line references, file names, and stack traces) nobody can tell at all.

Over to you for starters...

代码工作在一台机器上无法运行到其他机器。这是一种非常常见的错误模式。环境问题是造成这种错误的主要原因。首先,您应该确信您的代码很好并且只是确定哪个环境相关的问题不匹配。要确定并解决问题,您需要检查以下环境条款。



1.确保您的应用程序开发了适当的.NET框架。

2.确保第三方dll已经在那里部署了适当的版本。

3.确保数据库版本,并从您的应用程序中指出该数据库。

4 。检查适当的安全性是否已提供给您的应用程序/用户/目录/文件/数据库等。

5.如果您在GAC使用的任何组件确保在那里可用。

6.如果发现任何严重错误,请检查eventlog /您的自定义日志文件。

7.检查两次应用程序配置文件并确保每个配置值都正确。

8如果您的应用程序使用任何约定并且该约定对新目标计算机没有问题,请检查约定逻辑。例如,您假设目标机器必须具有d:\驱动器,其中d驱动程序文件目录必须存在。但那可能不存在。

9.检查你的应用程序开发64位机器但目标机器有32位。

10.可能更多
Code is working in one machine can not run to other machine. It is a very common pattern of error. Environmental Issue is the main reason for that type of error. First of all you should confident that your code is fine and just identify which environment related issue do not match. To identify and resolve issue you need to check the following environmental clause.

1. Make sure appropriate .NET framework is there which your application developed.
2. Make sure third party dll already deployed there with appropriate version.
3. Make sure database version there and from your application you point that database.
4. Check appropriate security is provided to your application/user/directory/file/database etc.
5. If any component you use from GAC make sure that is available there.
6. Check eventlog/your custom log file if any critical error found.
7. Check twice your application configuration file and make sure every config value is correct.
8. Check convention logic if your application use any convention and that convention has no problem with new target machine. For example you assume that target machine must has d:\ drive inside d drive program files directory must there. But that might not be there.
9. Check your application develop for 64 bit machine but there target machine have 32 bit.
10. Might be more


所以,我有错误信息..



就是这样:
So, I have the error message..

it's this :
System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception: Logon failure: unknown user name or bad password





我尝试了很多东西..但是它没有工作其他机器..我甚至在那里安装了SQL服务器但是没有..我把SQL脚本放在设置中但出了点问题而我找不到它..



我在网上搜索了如何使用实体框架部署应用程序以及如何在用户的计算机上创建数据库,但我没有设法找到解决方案..



所以如果如果我正在听的解决方案,任何人都有类似的问题..

谢谢



I have tried many things.. but it's not working on other machine..I even installed SQL server there but no..I put SQL scripts in the setup but something is going wrong and I cannot find it..

I searched the web for how to deploy apps using entity framework and how to create the Database on user's machine but I didn't manage to find a solution..

so if anyone have a similar problem if a solution I am listening..
thanks


这篇关于C#应用程序无法在用户计算机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆