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

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

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

瀏覽:33日期: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("請輸入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)請按任意鍵...");     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

程序共享:

解決后測試頁的展示:

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

標(biāo)簽: MsSQL
日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区
国产欧美在线| 日韩三区四区| 日韩福利视频一区| 午夜久久久久| 久久香蕉国产| 亚洲黑丝一区二区| 亚洲激情国产| 香蕉成人久久| 亚洲九九精品| 国产午夜一区| 欧美激情在线精品一区二区三区| 日韩和欧美的一区| 亚洲日产国产精品| 在线视频日韩| 免费人成在线不卡| 亚久久调教视频| 欧美一区久久| 久久中文字幕一区二区| 成人台湾亚洲精品一区二区| 日本免费久久| 亚洲免费高清| 91在线成人| av在线日韩| 老鸭窝亚洲一区二区三区| 天海翼精品一区二区三区| 97精品国产99久久久久久免费| 国产精品久久久亚洲一区| 国产成人免费| 欧美日韩在线网站| 亚洲影视一区| 国产一区2区| 香蕉久久夜色精品国产| 国产精品一在线观看| 日韩欧美在线中字| 亚洲v天堂v手机在线| 久久伊人亚洲| 欧美日韩精品一本二本三本| 日本不卡高清视频| 欧美日韩视频网站| 日本一区福利在线| 99视频精品全国免费| 日本综合精品一区| 日韩免费久久| 亚洲影视一区二区三区| 激情久久99| 亚洲精品福利| 亚洲二区三区不卡| 激情黄产视频在线免费观看| 日本在线不卡视频一二三区| 四虎884aa成人精品最新| 欧美一区成人| 一区二区亚洲视频| 九九在线精品| 国产伦久视频在线观看| 国产精品久久久亚洲一区| 亚洲永久字幕| 91国语精品自产拍| 日本在线精品| 久久精品午夜| 国产日韩一区二区三区在线| 蘑菇福利视频一区播放| 亚洲大片在线| 久久中文字幕av| 精品99在线| 国产一区二区三区黄网站| 国产精品午夜一区二区三区| 日本欧美一区二区| 爽好多水快深点欧美视频| 激情丁香综合| 欧美手机在线| 在线国产一区二区| 欧美午夜不卡| 国产美女一区| 国产亚洲一级| 国产精品毛片在线| 中文精品电影| 日本在线视频一区二区| 亚洲精品乱码| 日本欧美久久久久免费播放网| 91综合久久爱com| 欧美激情麻豆| 国产福利电影在线播放| 日韩中文首页| 日韩天堂av| 国产精品亲子伦av一区二区三区 | 国产亚洲电影| 欧美欧美黄在线二区| 日韩高清在线观看一区二区| 日本午夜精品视频在线观看| 欧美国产日本| 99热国内精品| 日韩国产在线一| 91视频一区| 久久亚洲图片| 麻豆久久久久久久| 亚洲电影在线| 国产精品**亚洲精品| 日韩毛片在线| 日本不卡的三区四区五区| 久久久91麻豆精品国产一区| 亚洲成av在线| 91亚洲无吗| 国产精品激情电影| 五月精品视频| 国产美女亚洲精品7777| 国产 日韩 欧美 综合 一区| 国产亚洲网站| 日本不良网站在线观看| 亚洲精品成a人ⅴ香蕉片| 91一区二区| 天堂精品久久久久| 欧洲在线一区| 欧美a级一区二区| 一级成人国产| 女主播福利一区| 久久男人av资源站| 国产精品**亚洲精品| 久久一区二区中文字幕| 久久香蕉网站| 日本午夜免费一区二区| 不卡一区2区| 国产成人77亚洲精品www| 日本国产欧美| 亚洲精品美女| 亚洲主播在线| 99热精品在线| 91九色精品| 欧美精品资源| 鲁鲁在线中文| 色婷婷色综合| 午夜av一区| 成人午夜亚洲| 欧美日韩国产一区二区在线观看| 日本 国产 欧美色综合| 久久影院一区| 久久要要av| 欧美日韩日本国产亚洲在线| 亚洲天堂1区| 日韩一区二区三区在线免费观看| 精品一区视频| 成人台湾亚洲精品一区二区| 国产在线日韩精品| 国产精品99一区二区三| 日韩成人亚洲| 日本精品影院| 免费观看久久av| 五月天久久网站| se01亚洲视频 | 亚洲美女久久精品| 日韩一区二区三区免费播放| 国产96在线亚洲| 国户精品久久久久久久久久久不卡| 成人久久一区| 首页国产欧美日韩丝袜| 国产精品免费看| 一区二区国产在线| 免费在线成人| 久久久9色精品国产一区二区三区| 亚洲高清av| 欧美三级第一页| 日韩国产一区| 日韩综合一区二区三区| 精品视频网站| 亚洲一区二区免费看| 国产精品对白久久久久粗| 国产伦久视频在线观看| 亚洲精选91| 欧美精品资源| 国产精品一站二站| 中文字幕成在线观看| 一区二区国产精品| 狠狠躁少妇一区二区三区| 亚洲三级网站| 久久久影院免费| 国产日韩欧美一区二区三区在线观看| 久久男人天堂| 国产欧美亚洲精品a| 日韩在线视频精品| 国产日韩欧美| 伊人国产精品| 国产91精品对白在线播放| 免费亚洲婷婷| 亚洲人www| 亚洲激情中文| 久久不卡日韩美女| 久久av一区| 99视频精品视频高清免费| 国产日韩欧美在线播放不卡| 日韩视频一区| 91久久久精品国产| 色偷偷偷在线视频播放 | 精品三级久久| 久久精品午夜| 免费在线日韩av| 日韩不卡一二三区| 日韩中文av| 涩涩涩久久久成人精品| 国产亚洲在线| 亚洲黄色在线| 99国产成+人+综合+亚洲欧美|