我有一个用VB.NET编写的ASP.NET Web应用程序.应用程序的一部分对内部ASMX文件进行AJAX调用,后者又调用远程Web服务,该服务只是一个ASMX文件.通常这工作正常,并已部署了几次,工作正常.但是,一个客户端从AJAX调用获取消息:
HTTP请求未经授权,客户端身份验证方案为"匿名".从服务器收到的身份验证标头是"NTLM".
我已经搜索了大量试图解决此问题的网站,但我似乎无法找到适合我的任何答案.
我无法在我的测试服务器上复制错误,这与客户端Win2003 IIS6相同.
远程Web服务部署在Windows 2008 r2 - IIS7.5上.仅使用"匿名"身份验证部署远程服务.客户端部署使用Anonymous和"集成Windows身份验证"进行设置.我尝试在两个实现上更改身份验证级别,但无法复制该问题.我最接近的是当我将远程服务IIS身份验证设置为
HTTP请求未经授权使用客户端身份验证方案'Ntlm'.从服务器收到的身份验证标头是''.
在web.config文件中,对远程服务的引用是:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SVCMappingSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://svc.website.com/services/myService.asmx" binding="basicHttpBinding" bindingConfiguration="SVCMappingSoap" contract="SVCMappingService.SVCMappingSoap" name="SVCMappingSoap"/>
</client>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
我尝试更改部分中的一些设置<security>但仍无法复制.
我正在为客户开发一个网络应用程序,我想使用Google API来绘制一些漂亮的图表.
客户端有一些敏感数据,并提出了一些安全问题,特别是他们不希望他们的数据"转到谷歌".
有2个选项或API用于生成图表.图表API,您可以在其中构建网址并提交给Google,以便生成图形图像 - 显然客户数据会转到Google,因此此选项是否定的.
第二个选项是使用Visualization API.据我所知,生成可视化的代码是从谷歌下载的,但用于构建输出的数据永远不会离开浏览器,因此对于敏感数据使用是"安全的".这是准确的描述吗?
我查看了Google API文档以尝试回答我的问题,但似乎无法找到明确的答案.
请指教.
我有应用程序“A”和一个代码最少的测试应用程序“B”,它们使用 OWIN 启动文件指向我们的身份服务器(Thinktecture)。这在两个启动文件中:
public void Configuration(IAppBuilder app)
{
JwtSecurityTokenHandler.InboundClaimTypeMap = new Dictionary<string, string>();
var identityServerUri = System.Configuration.ConfigurationManager.AppSettings["IdentityServerUrl"].ToString();
var redirectUri = System.Configuration.ConfigurationManager.AppSettings["RedirectUri"].ToString();
var postLogoutRedirectUri = System.Configuration.ConfigurationManager.AppSettings["PostLogoutRedirectUri"].ToString();
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Cookies",
ExpireTimeSpan = TimeSpan.FromMinutes(120),
SlidingExpiration = true
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
ClientId = "myclientid",
Authority = identityServerUri,
RedirectUri = redirectUri,
PostLogoutRedirectUri = postLogoutRedirectUri,
ResponseType = "id_token",
Scope = "openid profile email",
UseTokenLifetime = false,
SignInAsAuthenticationType = "Cookies"
});
}
Run Code Online (Sandbox Code Playgroud)
如果每次清除 cookie 后只是我在多台不同的机器上尝试,这两个应用程序都可以长时间进行身份验证和登录。当其他人开始尝试登录时,它可能会继续工作,但最终每个人都会开始陷入重定向循环,在那里您会获得身份服务器登录页面,点击登录,然后像往常一样返回应用程序,但是应用程序根本不运行任何代码(Home/Index 是第一个调用的东西,它永远不会在我设置日志记录的地方到达那里)它只是重定向回身份服务器,身份服务器检查并查看它们是否被记录in 并将它们重定向回来,直到最终标头响应变得太大并引发错误的请求错误。这一点,
在重定向问题后清除 cookie …
我有一个带有基本选项卡控件的html页面.我使用javascript来显示和隐藏标签和标签内容div.我的问题是,如果我将其中一个标签内容div中的元素的可见性更改为"隐藏",然后返回"可见",该元素似乎忘记或丢失其父div容器并保持可见,无论其原始父母知名度.
为了说明,请采用以下示例:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function hideTab(){
document.getElementById('tab1').style.visibility = 'hidden'
}
function showTab(){
document.getElementById('tab1').style.visibility = 'visible'
}
function hideContent(){
document.getElementById('tc1').style.visibility = 'hidden'
}
function showContent(){
document.getElementById('tc1').style.visibility = 'visible'
}
</script>
</head>
<body>
<a href="javascript: hideTab()">Hide Tab</a><br />
<a href="javascript: showTab()">Show Tab</a><br />
<a href="javascript: hideContent()">Hide Content</a><br />
<a href="javascript: showContent()">Show Content</a><br /><br />
<div id="tab1" style="background:yellow;width:100px">
<div id='tc1'>Content Text</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
在IE8中单击"隐藏选项卡",然后单击"显示选项卡",这样就可以了.显示选项卡后单击"隐藏内容",然后单击"显示内容"这也是正确的.现在再次单击"隐藏选项卡",您应该看到选项卡消失,但内容不正确.
在IE8中,当我使用兼容模式时问题消失.另外,我注意到如果我删除DOCTYPE元素,我无法复制问题.
在Chrome(我个人最喜欢的)中,无论DOCTYPE元素如何,问题都是持久的.我没有在firefox中试过这个.
我确信这种行为有一个很好的理由,我也相信我会有一个简单的解决方案让我的标签正常工作.我期待你的评论.
按照本网站的代码示例,我创建了一个创建映射内存文件的Windows控制台应用程序:
using (var file = MemoryMappedFile.CreateNew("myFile", 24))
{
var bytes = new byte[24];
for (var i = 0; i < bytes.Length; i++)
bytes[i] = (byte)(65 + i);
using (var writer = file.CreateViewAccessor(0, bytes.Length))
{
writer.WriteArray<byte>(0, bytes, 0, bytes.Length);
}
Console.WriteLine("Run memory mapped file reader before exit");
Console.WriteLine("Press any key to exit ...");
Console.ReadLine();
}
Run Code Online (Sandbox Code Playgroud)
在一个新的asp.net Web应用程序中,我使用代码读取了MMF:
protected void Page_Load(object sender, EventArgs e)
{
string sOutput = "";
using (var file = MemoryMappedFile.OpenExisting("myFile"))
{
using (var reader = file.CreateViewAccessor(0, …Run Code Online (Sandbox Code Playgroud) 我有一个asp.net nTier应用程序.数据访问层是一个强类型的DataSet,由多个DataTable和DataAdapter组成.当用户登录时,他们选择要连接的数据库(来自成员资格数据库中的表).我需要将选定的连接字符串传递给DataSet对象,该对象对于这些用户保持不变,直到他们再次登录.
我想答案可能是创建一个DataSet对象的部分类,我可以将连接字符串传递给构造函数.我不知道怎么回事.
干杯
我有下表记录了每天的值。问题是有时几天不见了。我想编写一个 SQL 查询,它将:
所以从下面的源表:
Date Value
--------------------
2010/01/10 10
2010/01/11 15
2010/01/13 25
2010/01/16 40
Run Code Online (Sandbox Code Playgroud)
我要回:
Date Value
--------------------
2010/01/10 10
2010/01/11 15
2010/01/12 20
2010/01/13 25
2010/01/14 30
2010/01/15 35
2010/01/16 40
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激。
是否可以将一个数据系列表示为点,将另一个数据系列表示为线?
在下面的图表中,我希望将蓝色"数据"行表示为点,同时将其他系列保留为线条,这可以使用Google Visualisations完成吗?

我使用以下代码在这个小提琴中生成了上图
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'x');
data.addColumn('number', 'Data');
data.addColumn('number', 'High');
data.addColumn('number', 'Low');
data.addRow(["A", 1, 5.5, 2.3]);
data.addRow(["B", 2, 5.5, 2.3]);
data.addRow(["C", 7, 5.5, 2.3]);
data.addRow(["D", 3, 5.5, 2.3]);
data.addRow(["E", 6, 5.5, 2.3]);
data.addRow(["F", 5, 5.5, 2.3]);
// Create and draw the visualization.
new google.visualization.LineChart(document.getElementById('visualization')).
draw(data, {
width: 500, height: 400}
);
}
Run Code Online (Sandbox Code Playgroud) 我有许多Windows 7 PC需要使用C#控制台应用程序中的Windows Update API修补特定的Windows更新.API需要搜索已安装的更新并报告它是否已安装,如果没有则执行安装.
在Virtual PC(Windows 7 Professional Hyper-v客户端)上进行测试时,我遇到类似于目标PC(Windows 7 Embedded)的情况,其中以下代码返回(非常快速且没有任何例外)0更新.我知道这是错的.事实上,它甚至在我安装.msu更新后返回.
码:
UpdateSession uSession = new UpdateSession();
IUpdateSearcher uSearcher = uSession.CreateUpdateSearcher();
uSearcher.Online = false;
try
{
ISearchResult sResult = uSearcher.Search("IsInstalled=1 And IsHidden=0");
Console.WriteLine("Found " + sResult.Updates.Count + " updates");
foreach (IUpdate update in sResult.Updates)
{
Console.WriteLine(update.Title);
if (update.Title.ToLower().Contains("kb123456")) {
//Update is not required
ReportInstalled();
return;
}
}
//If we get here, the update is not installed
InstallUpdate();
}
catch (Exception ex)
{
Console.WriteLine("Something went wrong: " + ex.Message);
} …Run Code Online (Sandbox Code Playgroud) asp.net ×4
google-api ×2
.net ×1
c# ×1
connection ×1
css ×1
dataset ×1
dom ×1
dynamic ×1
html ×1
http ×1
iis ×1
ipc ×1
javascript ×1
missing-data ×1
owin ×1
security ×1
string ×1
t-sql ×1
visibility ×1
web-services ×1
windows-7 ×1
wuapi ×1