- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何解决以下错误
"A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)"
这是我的 web.config 代码:
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;" />
</appSettings>
<connectionStrings>
<add name="paconn" connectionString="Data Source=XYZ-PC;Initial Catalog=crm;MultipleActiveResultSets=True;User ID=sa;Password=xyz@123" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<httpRuntime executionTimeout="60000" />
<customErrors mode="Off" />
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
<directoryBrowse enabled="false" />
<defaultDocument>
<files>
<clear />
<add value="Default.asp" />
<add value="Default.htm" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
<add value="index.php" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
以及我的引发错误的 C# 代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
public partial class autorefresh_create_emi : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["paconn"].ToString());
con.Open();
SqlCommand com1 = new SqlCommand("select max(f_casenum) from c_detail", con);
string check_max = com1.ExecuteScalar().ToString();
if (check_max == "0")
{
}
else
{
string st_id = "";
Int64 st = 0;
string max_id = "";
Int64 en = 0;
SqlCommand com2 = new SqlCommand("select top 1(f_casenum) from c_emi where f_casenum not in (select top 1 (f_casenum) from c_detail order by f_casenum) order by f_casenum", con);
st_id = com2.ExecuteScalar().ToString();
st_id = st_id.Substring(2);
st = Convert.ToInt64(st_id);
max_id = check_max;
max_id = max_id.Substring(2);
en = Convert.ToInt64(max_id);
for (Int64 i = st; i <= en; i++)
{
string f_casenum = "PA" + i;
string c_status = "";
string f_tenure = "";
SqlCommand com3 = new SqlCommand("select * from c_detail where f_casenum=@f_casenum", con);
com3.Parameters.AddWithValue("@f_casenum", f_casenum);
SqlDataReader reader3 = com3.ExecuteReader();
if (reader3.Read())
{
f_tenure = reader3["f_tenure"].ToString().Trim();
c_status = reader3["c_status"].ToString();
}
if (c_status == "Full Paid")
{
}
else
{
string row_check = "";
SqlCommand com4 = new SqlCommand("select count(f_invoice) from c_emi where f_casenum=@f_casenum", con);
com4.Parameters.AddWithValue("@f_casenum", f_casenum);
row_check = com4.ExecuteScalar().ToString().Trim();
if (f_tenure.Equals(row_check))
{
}
else
{
string st_id_invoice = "";
Int64 st_invoice = 0;
string max_id_invoice = "";
Int64 en_invoice = 0;
SqlCommand com5 = new SqlCommand("select min(f_invoice) from c_emi where f_casenum=@f_casenum", con);
com5.Parameters.AddWithValue("@f_casenum", f_casenum);
st_id_invoice = com5.ExecuteScalar().ToString();
st_id_invoice = st_id_invoice.Substring(3);
st_invoice = Convert.ToInt64(st_id_invoice);
SqlCommand com6 = new SqlCommand("select max(f_invoice) from c_emi where f_casenum=@f_casenum", con);
com6.Parameters.AddWithValue("@f_casenum", f_casenum);
max_id_invoice = com6.ExecuteScalar().ToString();
max_id_invoice = max_id_invoice.Substring(3);
en_invoice = Convert.ToInt64(max_id_invoice);
for (Int64 j = st_invoice; j <= en_invoice; j++)
{
string invoice_date = "";
string f_emi_due = "";
string f_total_emi = "";
string f_emi = "";
string f_b_curr = "";
string f_invoice = "PAI" + j;
string f_casenum1 = "";
SqlCommand com7 = new SqlCommand("select * from c_emi where f_invoice=@f_invoice", con);
com7.Parameters.AddWithValue("@f_invoice", f_invoice);
SqlDataReader reader7 = com7.ExecuteReader();
if (reader7.Read())
{
f_casenum1 = reader7["f_casenum"].ToString();
f_emi = reader7["f_emi"].ToString();
f_emi_due = reader7["f_emi_due"].ToString();
f_total_emi = reader7["f_total_emi"].ToString();
f_b_curr = reader7["f_b_curr"].ToString();
invoice_date = reader7["invoice_date"].ToString();
}
if (f_casenum == f_casenum1)
{
DateTime currr = DateTime.Now;
DateTime INDIAN_ZONE = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currr, "India Standard Time");
DateTime curr = INDIAN_ZONE;
string curr_invoicedate = curr.ToShortDateString();
DateTime check_invoicedate = Convert.ToDateTime(invoice_date);
check_invoicedate = check_invoicedate.AddDays(30);
check_invoicedate = Convert.ToDateTime(check_invoicedate);
string exit_date = check_invoicedate.ToShortDateString();
string f_emi_duedate = check_invoicedate.AddDays(10).ToShortDateString();
string invoice_date1 = check_invoicedate.ToShortDateString();
SqlCommand com8 = new SqlCommand("select f_casenum from c_emi where f_casenum=@f_casenum and CONVERT(date,invoice_date,101)=@invoice_date", con);
com8.Parameters.AddWithValue("@f_casenum", f_casenum);
com8.Parameters.AddWithValue("@invoice_date", exit_date);
string check_exitdate = "";
SqlDataReader reader8 = com8.ExecuteReader();
if (reader8.Read())
{
check_exitdate = reader8["f_casenum"].ToString();
}
else
{
}
if (check_exitdate != "")
{
}
else
{
if (curr >= check_invoicedate)
{
string value = "0";
string owner = "";
string i_status = "Unlock";
SqlCommand com9 = new SqlCommand("select MAX(f_invoice) from c_emi", con);
string maxid1 = com9.ExecuteScalar().ToString();
string id1 = maxid1;
Int64 code = 100000000001;
string c = "PAI";
if (id1.Substring(0, 1) != "P")
{
id1 = code.ToString();
id1 = c + id1.ToString();
}
else
{
id1 = id1.Substring(3);
Int64 a = Convert.ToInt64(id1);
a = a + 1;
id1 = c + a.ToString();
}
id1 = id1.ToString();
SqlCommand com11 = new SqlCommand("insert into c_emi values(@f_casenum,@f_b_amt,@f_emi,@f_emi_duedate,@f_invoice,@invoice_date,@f_overdue_amt,@f_emi_paid,@f_emi_due,@f_total_emi,@f_b_curr,@i_status,@owner,@convi_charges,@paidemi_date)", con);
SqlParameter obj1 = new SqlParameter("@f_casenum", DbType.StringFixedLength);
obj1.Value = f_casenum;
com11.Parameters.Add(obj1);
SqlParameter obj2 = new SqlParameter("@f_overdue_amt", DbType.StringFixedLength);
obj2.Value = value;
com11.Parameters.Add(obj2);
SqlParameter obj3 = new SqlParameter("@f_emi_paid", DbType.StringFixedLength);
obj3.Value = value;
com11.Parameters.Add(obj3);
SqlParameter obj4 = new SqlParameter("@f_emi_due", DbType.StringFixedLength);
obj4.Value = value;
com11.Parameters.Add(obj4);
SqlParameter obj5 = new SqlParameter("@f_total_emi", DbType.StringFixedLength);
obj5.Value = f_emi;
com11.Parameters.Add(obj5);
SqlParameter obj6 = new SqlParameter("@f_emi", DbType.StringFixedLength);
obj6.Value = f_emi;
com11.Parameters.Add(obj6);
SqlParameter obj7 = new SqlParameter("@f_emi_duedate", DbType.StringFixedLength);
obj7.Value = f_emi_duedate;
com11.Parameters.Add(obj7);
SqlParameter obj8 = new SqlParameter("@f_invoice", DbType.StringFixedLength);
obj8.Value = id1;
com11.Parameters.Add(obj8);
SqlParameter obj9 = new SqlParameter("@invoice_date", DbType.StringFixedLength);
obj9.Value = invoice_date1;
com11.Parameters.Add(obj9);
SqlParameter obj10 = new SqlParameter("@f_b_amt", DbType.StringFixedLength);
obj10.Value = f_b_curr;
com11.Parameters.Add(obj10);
SqlParameter obj11 = new SqlParameter("@f_b_curr", DbType.StringFixedLength);
obj11.Value = f_b_curr;
com11.Parameters.Add(obj11);
SqlParameter obj12 = new SqlParameter("@i_status", DbType.StringFixedLength);
obj12.Value = i_status;
com11.Parameters.Add(obj12);
SqlParameter obj13 = new SqlParameter("@owner", DbType.StringFixedLength);
obj13.Value = owner;
com11.Parameters.Add(obj13);
SqlParameter obj14 = new SqlParameter("@convi_charges", DbType.StringFixedLength);
obj14.Value = value;
com11.Parameters.Add(obj14);
SqlParameter obj15 = new SqlParameter("@paidemi_date", DbType.StringFixedLength);
obj15.Value = owner;
com11.Parameters.Add(obj15);
com11.ExecuteNonQuery();
}
else
{
}
}
}
else
{
}
}
}
}
}
}
con.Close();
}
}
排队
SqlDataReader reader7 = com7.ExecuteReader();
错误描述:
[SqlException (0x80131904): A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +388
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) +817
System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() +344
System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() +48
System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() +72
System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) +114
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +950
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +69
System.Data.SqlClient.SqlDataReader.get_MetaData() +134
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6553981
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +6556619
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +586
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +104
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +288
System.Data.SqlClient.SqlCommand.ExecuteReader() +302
autorefresh_create_emi.Page_Load(Object sender, EventArgs e) in e:\phurti_crm\autorefresh_create_emi.aspx.cs:106
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
我使用的是 ASP.Net 和 C#,数据库是 SQL Server 2012。
最佳答案
我使用以下方法解决了这个问题
reader.Close();
感谢您的支持。
关于c# - 从 asp.net c# 中的服务器错误接收结果时发生传输级错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27590614/
我一直在做一些关于测量数据传输延迟的实验 CPU->GPU 和 GPU->CPU。我发现对于特定消息大小,CPU->GPU 数据传输速率几乎是 GPU->CPU 传输速率的两倍。谁能解释我为什么会这样
我将 ElasticSearch 用作我的 Post 模型的 Rails pet 项目应用程序的全文引擎。在我的 posts_controller.rb 索引操作中: def index
概述 流经网络的数据总是具有相同的类型:字节,这些字节如何传输主要取决于我们所说的网络传输。用户并不关心传输的细节,只在乎字节是否被可靠地发送和接收 如果使用 Java 网络编程,你会发现,某些时候当
我正在编写一些代码,以便将共享点从该页面转移到另一个页面: Server.Transfer("/DefectManagement/DefectList/default.aspx") 但是我遇到了这个问
我有这个泄漏,任何猜测?这个类有一些奇怪的引用。我的代码的任何地方都没有 contentobserver In com.example:1.5.0:27. com.example.ui.record
我听说过点对点内存传输并阅读了一些关于它的内容,但无法真正理解与标准 PCI-E 总线传输相比它的速度有多快。 我有一个使用多个 GPU 的 CUDA 应用程序,我可能对 P2P 传输感兴趣。我的问题
ftping 文件时,Transmit 中是否有忽略或过滤器列表?我希望它忽略上传 .svn 文件等。 最佳答案 是的。转到首选项并选择 Rules标签。在那里您可以定义要跳过哪些文件的规则。实际上,
我有以下片段来生成声音,在 while 循环中,我想动态更改它,以便它在声音生成期间创建不同频率的声音。 for(uint16_t i = 0; i < sample_N; i++) { da
我正在尝试使用 Delphi 2010 和 Indy 对 Web 服务进行概念验证。我此时的代码是: procedure TForm1.Log(const sEvent, sMsg: String);
我有一个 ActiveMQ JMS 代理,在端口 61616 上使用默认的 openwire TCP 传输公开。 我有许多远程客户端可以绑定(bind)到此代理来监听他们的消息。 如果我想打开 kee
reconnection strategies文档仅使用 JMS 示例,但是 FTP transport documentation确实说明了重新连接策略的使用,但没有任何细节或示例。 进一步,如果你
我有 2 个 TreeView,第一个填充有项目。 try { CheckBoxTreeItem treeRoot = new CheckBoxTreeItem("Root"); tr
在我为学校开发的一个网站上,用户输入他们的学校电子邮件和密码,如果他们已注册,则登录。如果没有,则会显示登录的第二部分,要求输入笔名称并确认密码。正因为如此,以及我复杂的业余 Django 编程,我有
我正在开发一个 Web 服务,我们在其中使用 LINQ-to-SQL 进行数据库抽象。当客户使用我们的网络服务时,对象被序列化为 XML,一切都很好。 现在我们希望开发我们自己的使用本地数据类型的客户
我应该创建一个名为“Backwards”的方法,该方法将列表从尾部横向到头部,但是当我运行代码时,它出现说(第 88 行)它找不到光标 = cusor.prev;象征。我需要在循环中再次设置上一个链接
给定像 Uint8Array 这样的类型化数组,似乎有两种方法可以通过 worker 传输它们。 选项 1 直接发送缓冲区并在接收端进行转换: 发件人:postMessage({fooBuffer:
在 PHP + jQuery 环境中,我和我的 friend 无法得出最佳解决方案。我们正在使用 Ajax 从数据库中获取数据。 解决方案 1 - Ajax 应该只传输数据,而不是 HTML 好处:我
大家好,非常感谢您的宝贵时间。 有一个 std::stringstream 需要传输到远程机器。网络库允许我用以下方法构建数据包: CreatePacket( const void * DATA, s
我正在使用 libcurl 通过 FTP 传输二进制文件 (.exe),并将其保存到本地文件。问题是文件传输后,它已被更改,不再是有效的 Win32 应用程序,因此无法运行。这是我的做法: CURL
各位程序员, 当我将它上传到我的 FTP 时,我的网站出现此错误:资源被解释为样式表,但使用 MIME 类型文本/纯文本传输 BlahBlahi
我是一名优秀的程序员,十分优秀!