日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区

您的位置:首頁技術(shù)文章
文章詳情頁

SQL Server Reporting Services 匿名登錄的問題及解決方案

瀏覽:35日期:2023-03-06 14:25:37

每次訪問報(bào)表都需要windows驗(yàn)證,這樣的報(bào)表給客戶確實(shí)很說不過去.

SSRS 可以匿名登錄的設(shè)定步驟:

環(huán)境:

  開發(fā)工具:SQL Server Business Intelligence Development Studio

  數(shù)據(jù)庫: SQL2008

首先確定你的Reporting Services 目錄位置

默認(rèn)為:C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer

打開目錄會(huì)修改該目錄下的3個(gè)配置文件,分別為:rsreportserver.config ,rssrvpolicy.config ,web.config

解決步驟:

  1.打開rsreportserver.config

   修改Configuration/Authentication/AuthenticationTypes

   修改前:

<Authentication>    <AuthenticationTypes><RSWindowsNTLM/>    </AuthenticationTypes>    </Authentication>

修改后:

<Authentication>    <AuthenticationTypes><Custom/>    </AuthenticationTypes>    </Authentication>

2. 修改web.config

<!--節(jié)點(diǎn):configuration/system.web/authentication --><!-- 修改前 --><authentication mode="Windows" /><identity impersonate="true" /><!-- 修改后 --><authentication mode="None" /><identity impersonate="false" />

3. 從微軟下載匿名登錄的范例項(xiàng)目
( 下載網(wǎng)址 http://blog.quasarinc.com/wp-content/uploads/2012/03/Microsoft.Samples.ReportingServices.AnonymousSecurity.zip),
并且重新編譯出一個(gè)新的 Microsoft.Samples.ReportingServices.AnonymousSecurity.dll 動(dòng)態(tài)庫,
范例為2010解決方案,其實(shí)里面用到的只是class1.cs文件,還有項(xiàng)目名稱不能變,和我們下面配置有直接關(guān)系.

打開解決方案 將 Microsoft.ReportingServices.Interfaces.dll 的引用移除,并添加本地服務(wù)器的這個(gè)文件,位置在 ..\Reporting Services\ReportServer\bin 下, (注意別把這個(gè)dll當(dāng)成萬能的)

重新編譯會(huì)生成 :Microsoft.Samples.ReportingServices.AnonymousSecurity.dll 將該文件放置bin目錄下

4.再次修改rsreportserver.config

<!--修改節(jié)點(diǎn):Configuration/Extensions/Security/Extension --><!-- 修改前 --><Security>    <Extension Name="Windows" Type="Microsoft.ReportingServices.Authorization.WindowsAuthorization, Microsoft.ReportingServices.Authorization" /></Security><Authentication>    <Extension Name="Windows" Type="Microsoft.ReportingServices.Authentication.WindowsAuthentication, Microsoft.ReportingServices.Authorization" /></Authentication><!-- 修改后 --><Security>  <Extension Name="None" Type="Microsoft.Samples.ReportingServices.AnonymousSecurity.Authorization, Microsoft.Samples.ReportingServices.AnonymousSecurity" /></Security><Authentication>  <Extension Name="None" Type="Microsoft.Samples.ReportingServices.AnonymousSecurity.AuthenticationExtension, Microsoft.Samples.ReportingServices.AnonymousSecurity" /></Authentication>

5. 在 rssrvpolicy.config 內(nèi)新增一個(gè)節(jié)點(diǎn)

<!-- 要增加的節(jié)點(diǎn) configuration/mscorlib/security/PolicyLevel 之下 --><CodeGroupversion="1"PermissionSetName="FullTrust"Name="Private_assembly"Description="This code group grants custom code full trust. ">  <IMembershipCondition   version="1"  Url="C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"  /></CodeGroup>

注意:這個(gè)Url,路徑是reporting services 目錄下新編譯的文件,不同數(shù)據(jù)庫版本,或安裝目錄不同,會(huì)有差異

6. 重新啟動(dòng) Reporting Services

完美解決,歷時(shí)半個(gè)月,這個(gè)問題終于告以段落,以后可以專心設(shè)計(jì)報(bào)表了.

以上解決方案參考于msdn上的一篇文章,做了些整理.

由于是程序員,所有手工做的事還是交給程序做,以上5個(gè)步驟,已使用程序?qū)崿F(xiàn):

起個(gè)名字叫:ssrs_onekey_nologin 全稱:sql server report serveics 一鍵匿名登錄配置.

主要功能,修改xml ,自己生成dll,copy至 bin目錄下.

使用說明:需錄入report services 目錄

代碼共享:

 class Program       {   static void Main(string[] args)   {       Console.WriteLine("請(qǐng)輸入Reporting Services目錄:為空則與c盤默認(rèn)sql2008");       string a = Console.ReadLine();             string basePath;      if (string.IsNullOrEmpty(a))      { basePath = @"c:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer";      }else     { basePath = a;      }      Console.WriteLine("Reporting Services 目錄為:{0}", basePath);     Console.WriteLine("確認(rèn)請(qǐng)按任意鍵...");     Console.ReadKey();      string bakPath = @"c:\SSRS_noLogin_bak\" + DateTime.Now.ToString("yyyyMMddHHmmss");    Directory.CreateDirectory(bakPath);    File.Copy(basePath + "\\rsreportserver.config", bakPath + "\\rsreportserver.config");    File.Copy(basePath + "\\web.config", bakPath + "\\web.config");     File.Copy(basePath + "\\rssrvpolicy.config", bakPath + "\\rssrvpolicy.config");       Console.WriteLine("第1步開始:");    Step1(basePath);    Console.WriteLine("第1步結(jié)束.");    Console.WriteLine("第2步開始:");    Step2(basePath);    Console.WriteLine("第2步結(jié)束.");     Console.WriteLine("第3步開始:");     Step3(basePath);    Console.WriteLine("第3步結(jié)束.");    Console.WriteLine("第4步開始:");     Step4(basePath);     Console.WriteLine("第4步結(jié)束.");     Console.WriteLine("第5步開始:");     Step5(basePath);     Console.WriteLine("第5步結(jié)束.");      Console.WriteLine("完成");   Console.ReadKey(); }  static void Step1(string basePath) {     string file = basePath + "\\rsreportserver.config";     XmlDocument doc = new XmlDocument();     doc.Load(file);  //Configuration     XmlNode xn = doc.SelectSingleNode("Configuration/Authentication/AuthenticationTypes");     XmlNode oldXn = xn.SelectSingleNode("RSWindowsNTLM");     if (oldXn == null)     { Console.WriteLine("未找到RSWindowsNTLM,或已更改");    }    else   {XmlNode newXn = doc.CreateElement("Custom");xn.ReplaceChild(newXn, oldXn);     }      doc.Save(file);   }static void Step2(string basePath) {     XmlDocument doc = new XmlDocument();     string file = basePath + "\\web.config";     doc.Load(file);    XmlNode xn2 = doc.SelectSingleNode("configuration/system.web/authentication");     XmlElement xm2 = (XmlElement)xn2;      xm2.SetAttribute("mode", "None");     XmlNode xn3 = doc.SelectSingleNode("configuration/system.web/identity");   XmlElement xm3 = (XmlElement)xn3;    xm3.SetAttribute("impersonate", "false");    doc.Save(file);}  static void Step3(string basePath)  {    CSharpCodeProvider objCSharpCodePrivoder = new CSharpCodeProvider();     CompilerParameters objCompilerParameters = new CompilerParameters();     objCompilerParameters.ReferencedAssemblies.Add("System.dll");     objCompilerParameters.ReferencedAssemblies.Add(basePath + @"\bin\Microsoft.ReportingServices.Interfaces.dll");     string strSourceCode = Resources.Class1;     objCompilerParameters.GenerateInMemory = false;    objCompilerParameters.OutputAssembly = "Microsoft.Samples.ReportingServices.AnonymousSecurity.dll";    CompilerResults cr = objCSharpCodePrivoder.CompileAssemblyFromSource(objCompilerParameters, strSourceCode);     if (cr.Errors.HasErrors)    { string strErrorMsg = cr.Errors.Count.ToString() + " Errors:"; for (int x = 0; x < cr.Errors.Count; x++) {    strErrorMsg = strErrorMsg + "/r/nLine: " + cr.Errors[x].Line.ToString() + " - " +  cr.Errors[x].ErrorText; } Console.WriteLine(strErrorMsg); return;    }     File.Copy("Microsoft.Samples.ReportingServices.AnonymousSecurity.dll", basePath + @"\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll", true);     File.Delete("Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"); } static void Step4(string basePath){     XmlDocument doc = new XmlDocument();     string file = basePath + "\\rsreportserver.config";    doc.Load(file);     XmlNode xn2 = doc.SelectSingleNode("Configuration/Extensions/Security/Extension");    XmlElement xm2 = (XmlElement)xn2;     xm2.SetAttribute("Name", "None");     xm2.SetAttribute("Type", "Microsoft.Samples.ReportingServices.AnonymousSecurity.Authorization, Microsoft.Samples.ReportingServices.AnonymousSecurity");    XmlNode xn3 = doc.SelectSingleNode("Configuration/Extensions/Authentication/Extension");    XmlElement xm3 = (XmlElement)xn3;    xm3.SetAttribute("Name", "None");    xm3.SetAttribute("Type", "Microsoft.Samples.ReportingServices.AnonymousSecurity.AuthenticationExtension, Microsoft.Samples.ReportingServices.AnonymousSecurity");      doc.Save(file); }  static void Step5(string basePath){    XmlDocument doc = new XmlDocument();     string file = basePath + "\\rssrvpolicy.config";     doc.Load(file);    XmlNode xn1 = doc.SelectSingleNode("configuration/mscorlib/security/PolicyLevel/CodeGroup[@class=UnionCodeGroup]");    if (xn1 != null)    {//已添加    }   else     { XmlNode xn = doc.SelectSingleNode("configuration/mscorlib/security/policy/PolicyLevel"); XmlElement xe = doc.CreateElement("CodeGroup");xe.SetAttribute("class", "UnionCodeGroup"); xe.SetAttribute("version", "1"); xe.SetAttribute("PermissionSetName", "FullTrust"); xe.SetAttribute("Name", "Private_assembly");xe.SetAttribute("Description", "This code group grants custom code full trust.");  XmlElement xe2 = doc.CreateElement("IMembershipCondition"); xe2.SetAttribute("class", "UrlMembershipCondition"); xe2.SetAttribute("version", "1");xe2.SetAttribute("Url", basePath + @"\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"); xe.AppendChild(xe2);xn.AppendChild(xe);   }    doc.Save(file);}      } }ssrs onkey no login

程序共享:

解決后測(cè)試頁的展示:

到此這篇關(guān)于關(guān)于 SQL Server Reporting Services 匿名登錄的解決方案的文章就介紹到這了,更多相關(guān)SQL Server Reporting Services內(nèi)容請(qǐng)搜索以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持!

標(biāo)簽: MsSQL
日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区
久久wwww| 你懂的亚洲视频| 日本免费久久| 亚洲精品中文字幕乱码| 中文一区一区三区免费在线观| 日本va欧美va精品发布| 久久精品免视看国产成人| 精品日韩视频| 亚洲欧美久久精品| 精品午夜久久| 一区二区自拍| 国产精品视频一区二区三区| 香蕉成人av| 亚洲v天堂v手机在线| 精品一区二区三区中文字幕视频| 色婷婷狠狠五月综合天色拍| 蜜臀精品久久久久久蜜臀| 91精品国产经典在线观看| 日韩高清成人| 午夜电影一区| 午夜av成人| 日本aⅴ亚洲精品中文乱码| 激情国产在线| 婷婷综合电影| 亚洲成a人片| 日韩精品视频中文字幕| 欧美成a人国产精品高清乱码在线观看片在线观看久 | 欧美日韩精品在线一区| 亚洲区欧美区| 偷拍精品精品一区二区三区| 日韩精品导航| 色88888久久久久久影院| 日韩欧美久久| 亚洲一级特黄| 国产精品一区二区av交换| 黄色亚洲在线| 精品精品99| 蜜臀精品久久久久久蜜臀| 国产成人精选| 91亚洲精品在看在线观看高清| 色婷婷精品视频| 国产精品一区2区3区| 亚洲深夜av| 亚洲黄色中文字幕| 久久精品99久久久| 日韩一区二区免费看| 麻豆国产一区| 亚洲午夜国产成人| 欧美色图国产精品| 欧美经典一区| 午夜亚洲一区| 欧产日产国产精品视频| 国产欧美日韩精品高清二区综合区| 四虎4545www国产精品| 国产精品久久久久久久免费软件| 影院欧美亚洲| 成人免费电影网址| 精品国产99| 国产欧美高清视频在线| 热久久免费视频| 久久人人99| 精品国产网站| 日韩 欧美一区二区三区| 婷婷中文字幕一区| 国产白浆在线免费观看| 国产精品一区二区中文字幕| 亚洲精品亚洲人成在线观看| 国产综合精品| 欧美男人天堂| 国内一区二区三区| 麻豆91精品视频| 日韩成人精品一区二区三区 | 蜜臀久久久久久久| 婷婷国产精品| 亚洲综合在线电影| 成人精品视频| 国产精品原创| 九九久久国产| 国产精品www.| 国产精品亚洲欧美| 欧美日韩精品一区二区三区视频 | 一区福利视频| 欧美二区视频| 成人免费电影网址| 日韩欧美字幕| 欧美aa在线观看| 久久天堂成人| 青青久久av| 欧美.日韩.国产.一区.二区 | 久久精品国产www456c0m| 人在线成免费视频| 日韩专区精品| 激情欧美国产欧美| 五月天激情综合网| 少妇久久久久| 中文另类视频| 欧美日韩激情| 在线视频精品| 亚洲一区导航| 欧美日韩一区二区三区在线电影| 国产亚洲精品美女久久久久久久久久| 久久国产日韩欧美精品| 国产毛片精品久久| 欧美a级一区二区| 久久亚洲道色| 色综合狠狠操| 91精品蜜臀一区二区三区在线 | 四虎成人精品一区二区免费网站| 日本伊人午夜精品| 国产精品一区毛片| 大香伊人久久精品一区二区 | 日韩国产91| 国产精品巨作av| 国产福利资源一区| 成人亚洲精品| 婷婷成人在线| 亚洲一级大片| 国产精品对白久久久久粗| 国产一区二区三区久久久久久久久| 日本久久精品| 欧美高清一区| 少妇精品在线| 红杏一区二区三区| 蜜臀av免费一区二区三区| 国产免费成人| 欧美中文高清| 国产精品黑丝在线播放| 午夜国产精品视频免费体验区| 中文字幕中文字幕精品| 国产精品一二| 婷婷成人在线| 日韩精品视频中文字幕| 国产一区二区三区日韩精品| 不卡中文一二三区| 日本伊人午夜精品| 欧美好骚综合网| 蜜桃久久av| 国产欧美在线观看免费| 福利在线免费视频| 噜噜噜久久亚洲精品国产品小说| 青草国产精品| 人在线成免费视频| 在线一区二区三区视频| 精品淫伦v久久水蜜桃| 欧美在线影院| 国产精品高潮呻吟久久久久| 国产综合精品| 国产精品久久久网站| 久久人人97超碰国产公开结果| 石原莉奈在线亚洲二区| 美女精品久久| 国产视频一区欧美| 老司机免费视频一区二区| 免费精品国产的网站免费观看| 日韩国产欧美一区二区三区| 亚洲成人不卡| 91九色综合| 一区二区小说| 国产精品美女在线观看直播| 午夜精品网站| 精品视频在线你懂得| 老色鬼久久亚洲一区二区| 久久亚洲人体| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久av综合| 丝袜美腿一区二区三区| 色婷婷色综合| 欧美在线日韩| 亚洲黄页一区| 国产精品毛片一区二区在线看| 婷婷综合福利| 欧美 日韩 国产精品免费观看| 美女视频黄 久久| 五月激激激综合网色播 | 精品日韩毛片| 国产成人1区| 日韩不卡手机在线v区| av亚洲在线观看| 久久精品国产99国产| 一区二区精彩视频| 国产在线成人| 国产 日韩 欧美 综合 一区| 日韩福利视频一区| 亚洲激情av| 超级白嫩亚洲国产第一| 国产日产精品一区二区三区四区的观看方式| 黄色精品网站| 天堂8中文在线最新版在线| 欧美一级网址| 免费人成在线不卡| 欧美日中文字幕| 国产精品yjizz视频网| 国产精品天天看天天狠| 一区二区精彩视频| 黄色亚洲免费| 亚洲天堂黄色| 欧美久久天堂| 高清不卡一区| 欧美激情视频一区二区三区在线播放| 亚洲精品在线国产|