小编Sil*_*ght的帖子

远程主机关闭连接错误,怎么修复?

我在我的项目中使用elmah - > Elmah.axd来查找错误.
有这样的错误:

System.Web.HttpException: The remote host closed the connection. The error code is 0x800703E3.
Generated: Sun, 27 Nov 2011 13:06:13 GMT

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException (0x800703E3): The remote host closed the connection. The error code is 0x800703E3.
   at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
   at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
   at System.Web.HttpResponse.Flush(Boolean finalFlush)
   at System.Web.HttpWriter.TransmitFile(String filename, Int64 offset, Int64 size, Boolean isImpersonating, Boolean supportsLongTransmitFile)
   at System.Web.HttpResponse.TransmitFile(String filename, Int64 offset, Int64 length)
   at SalarSoft.Utility.SP1.ResumeDownload.ProcessDownload(String fileName, String …
Run Code Online (Sandbox Code Playgroud)

c# asp.net elmah windows-server-2008-r2

18
推荐指数
2
解决办法
6万
查看次数

我怎么能用jquery看到一个看不见的控件(隐藏并显示不起作用)

如何使用jQuery更改控件的可见性?我有一个控件,它的可见属性为false ...(不是css)

当我使用show()函数时没有发生任何事情,似乎hide()show()方法是针对控件的css集,而不是可见属性...

谢谢你的回答,

最好的祝福

asp.net jquery controls visibility visual-studio-2008-sp1

16
推荐指数
2
解决办法
10万
查看次数

如何在CookieContainer中获取cookie信息?(所有这些,不是针对特定领域)

请参阅以下代码:

CookieContainer cookieJar = new CookieContainer();
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://www.google.com");
request.CookieContainer = cookieJar;

HttpWebResponse response = (HttpWebResponse)request.GetResponse();
int cookieCount = cookieJar.Count;
Run Code Online (Sandbox Code Playgroud)

我如何在里面获取cookie信息cookieJar?(所有这些,不只是针对特定域.)
我如何添加或删除cookie?

c# cookies .net-4.0 httpwebrequest httpwebresponse

16
推荐指数
4
解决办法
4万
查看次数

如何在另一个远程桌面内的远程桌面中切换全屏模式?

在我的vps中,我运行远程桌面并连接到另一个vps.
现在新的遥控器有整个屏幕,我无法控制主vps!
我该如何切换这种全屏模式?

提前致谢

remote-desktop fullscreen windows-server-2008-r2

14
推荐指数
5
解决办法
6万
查看次数

screen.width和screen.availwidth在javascript中的区别

screen.widthscreen.availwidthJavaScript有什么区别?

在我的系统上都是一样的!

javascript width screen-resolution

13
推荐指数
2
解决办法
1万
查看次数

如何使用C#在ASP.NET中将List <> Collection用作Repeater数据源

我有一个列表集合如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FileExplorer.Classes
{
    public class NewAddedFiles
    {
        public string FileName;
        public string FilePath;
        public DateTime FileCreationDate;
    }
}
Run Code Online (Sandbox Code Playgroud)
private void GetFilesFromDirectory(string PhysicalPath)
{
    DirectoryInfo Dir = new DirectoryInfo(PhysicalPath);
    FileInfo[] FileList = Dir.GetFiles("*.*", SearchOption.AllDirectories);
    List<NewAddedFiles> list = new List<NewAddedFiles>();
    NewAddedFiles NewAddedFile = new NewAddedFiles();
    foreach (FileInfo FI in FileList)
    {
        //Response.Write(FI.FullName);
        //Response.Write("<br />");
        string AbsoluteFilePath = FI.FullName;
        string RelativeFilePath = "~//" + AbsoluteFilePath.Replace(Request.ServerVariables["APPL_PHYSICAL_PATH"], String.Empty);
        NewAddedFile.FileName = FI.Name;
        NewAddedFile.FilePath = RelativeFilePath;
        NewAddedFile.FileCreationDate = …
Run Code Online (Sandbox Code Playgroud)

c# asp.net collections repeater datasource

12
推荐指数
1
解决办法
3万
查看次数

使用jQuery在特定元素之后查找元素

使用jQuery选择器,如何div在另一个特定元素之后立即查找元素?(不是兄弟姐妹,next()在这种情况下无法帮助)

jquery selector

11
推荐指数
1
解决办法
2万
查看次数

错误#1045 - 无法登录MySQL服务器 - > phpmyadmin

我们在运行IIS 7.0的Windows机器上安装了PHPMyAdmin.
我们可以使用命令行连接到MySQL,但是我们无法使用PHPMyAdmin进行连接.
显示的错误是:Error #1045 Cannot log in to the MySQL server.
有人可以帮忙吗?

PHP Version 5.4.0
mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $
phpMyAdmin-3.5.4-rc1-all-languages.7z

编辑:
我按照下面的链接没有成功,意味着我更改了密码,但phpmyadmin仍然有错误...
C.5.4.1.1.重置root密码:Windows系统

也有下面的线程在堆栈中没有帮助:
随机错误:#1045无法登录到MySQL服务器,
但该错误不是随机的 - >我总是有错误...

这是phpmyadmin文件夹中的config.inc.php文件:

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Config file view and save screen
 *
 * @package PhpMyAdmin-setup
 */

if (!defined('PHPMYADMIN')) {
    exit;
}

/**
 * Core libraries.
 */
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';

$config_readable = false;
$config_writable = false;
$config_exists …
Run Code Online (Sandbox Code Playgroud)

mysql passwords login phpmyadmin windows-server-2008-r2

11
推荐指数
4
解决办法
18万
查看次数

如何将double格式化为字符串,并在必要时仅显示十进制数字?

我的代码如下:

lblFranshizShowInvwNoskhehEdit.Text = string.Format("{0:n}",
    (double)(int.Parse(drDarman["FranshizDarsad"].ToString()) * 
        Convert.ToInt64(RadNumerictxtPayInvwNoskhehEdit.Text)) / 100);
Run Code Online (Sandbox Code Playgroud)

{0:n0}字符串格式强制标签的文本不具有十进制数字,{0:n}字符串格式强制标签的文本具有2个十进制数字(默认).

在我的场景中,我只想在必要时使用十进制数字/不进行舍入/我该怎么做?

c# format numbers decimal string-formatting

10
推荐指数
1
解决办法
2万
查看次数

发送HTTP标头后,服务器无法修改cookie,如何修复?

如果Cookie中存在UserName和Password,我想在masterpage的page_load上自动登录我的用户!
所以我写下面的代码:

        protected void Page_Load(object sender, EventArgs e)
        {
            LoadDataFromCookieIfExistAndLogin();
        }

private void LoadDataFromCookieIfExistAndLogin()
{
    string Query = Request.Url.Query.ToString();
    string[] Ar_Query = new string[2];
    string[] splitter = { "%2f" };
    Ar_Query = Query.Split(splitter, System.StringSplitOptions.None);
    string[] Ar_new_Query = new string[2];
    int minLength = Math.Min(Ar_Query.Length, Ar_new_Query.Length);
    Array.Copy(Ar_Query, Ar_new_Query, minLength);
    if (string.IsNullOrEmpty(Ar_new_Query[1]))
    {
        Ar_new_Query[1] = string.Empty;
    }

    if ((Request.QueryString["ReturnURL"] != null) && (Ar_new_Query[1].ToString().ToUpper() == "ADMIN"))
    {
        Session.Clear();
        FormsAuthentication.SignOut();
    }
    else if ((Request.QueryString["ReturnURL"] != null) && (Ar_new_Query[1].ToString().ToUpper() == "ELMAH.AXD"))
    {
        Session.Clear();
        FormsAuthentication.SignOut();
    }
    else …
Run Code Online (Sandbox Code Playgroud)

c# asp.net cookies forms-authentication

10
推荐指数
1
解决办法
2万
查看次数