我有两个报告,一个是内部用户,另一个是外部用户,
对于内部用户,我需要启用表单身份验证才能查看报告,而不是在服务器中创建用户帐户.
对于外部用户,我不想启用任何身份验证,以便他们可以从浏览器访问报告而无需任何身份验证.
我按照以下步骤使用来自以下链接的SSRS样本,在完成所有更改后我得到HTTP500错误.请帮助启用此基于表单的身份验证.
修改RSReportServer.config文件
步骤1:-
<Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
Run Code Online (Sandbox Code Playgroud)
第2步:-
<Security>
<Extension Name="Forms"
Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization,
Microsoft.Samples.ReportingServices.CustomSecurity" >
<Configuration>
<AdminConfiguration>
<UserName>username</UserName>
</AdminConfiguration>
</Configuration>
</Extension>
</Security>
<Authentication>
<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension, Microsoft.Samples.ReportingServices.CustomSecurity" />
</Authentication>
Run Code Online (Sandbox Code Playgroud)
第3步: -
<UI>
<CustomAuthenticationUI>
<loginUrl>/Pages/UILogon.aspx</loginUrl>
<UseSSL>True</UseSSL>
</CustomAuthenticationUI>
<ReportServerUrl>http://<server>/ReportServer</ReportServerUrl>
</UI>
Run Code Online (Sandbox Code Playgroud)
修改RSSrvPolicy.config文件
第4步:-
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>
Run Code Online (Sandbox Code Playgroud)
修改RSMgrPolicy.config文件
第五步: -
<CodeGroup
class="FirstMatchCodeGroup"
version="1" …Run Code Online (Sandbox Code Playgroud) sql-server forms-authentication reporting-services ssrs-2008 msbi
我创建了一个在c#中添加两个数字的基本类.我把它建成了一个dll,但是当我试图在golang中调用它时,我没有成功.
目前这可能在golang吗?如果是这样,有人可以举例说明如何做到这一点?
编辑:我已经包含了我做这件事的最后一次尝试.C#dll只是一个添加传入的两个数字的方法.
package main
import (
"fmt"
"syscall"
)
func main() {
var mod = syscall.NewLazyDLL("MathForGo.dll")
var proc = mod.NewProc("Add");
proc.Call(2,3);
fmt.Printf("%v",proc)
}
Run Code Online (Sandbox Code Playgroud) 我想创建一个只显示其中包含%的值的视图.
我试过跟随
Alter VIEW [dbo].[history] as
select
[objid]
,[interval]
,[value_channel]
,[value_channelid]
,case when [value_text] like '[%]' then right([value text],2)
,[value_raw_text]
,[coverage_raw]
from .....
Run Code Online (Sandbox Code Playgroud)
但我在","附近收到错误语法错误.
任何的想法?
我在 sqlserver 中有一个表,我的表有一个字符串字段,例如 FirstName(这只是示例!)。在插入数据库之前,此字段“EncryptByPassPhrase”。
Before encode: Ali
After encode: 0x010000001D905174BB7947AE1C600A4AB564A123310F92C21C9A4221
Run Code Online (Sandbox Code Playgroud)
现在我会在这个字段上搜索,例如我会得到所有包含字符“Al”的字段。
select * from EncodeTest e
where dbo.Decoder(e.FirstName) like '%Al%'
Run Code Online (Sandbox Code Playgroud)
但是这种方式在许多记录上非常慢。请帮助我寻求最佳解决方案。
谢谢。
declare @EncodedName varbinary(max)
select @EncodedName =EncryptByPassPhrase('key', cast( @Name as varbinary(max)) )
declare @DecodedName nvarchar(max)
select @DecodedName=convert(varchar(100),DecryptByPassPhrase('key',cast( @EncodedName as varbinary(max)) ))
select * from EncodeTest e
where dbo.Decoder(e.FirstName) like '%Al%'
Run Code Online (Sandbox Code Playgroud) 询问
SELECT ID, Name, Phone
FROM Table1
LEFT JOIN Table2 ON Table1.ID = Table2.ID
WHERE Table2.ID IS NULL
Run Code Online (Sandbox Code Playgroud)
问题
Table2完全省略吗?因为根本没有加入?任何帮助将非常感激.
我创建了一个AccountModel具有以下属性的
public class AccountModel
{
[Required]
[EmailAddress]
public string Email { get; set; }
[Required]
[StringLength(10, MinimumLength = 6)]
public string Password { get; set; }
[NotMapped] // Does not effect with your database
[Compare("Password")]
[BindRequired]
public string ConfirmPassword { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
SignUp我正在尝试对和使用相同的模型SignIn。该模型非常适合注册,但是当我为SignIn我的模型使用相同的模型时,该模型变得无效。
我知道原因是因为我没有传递“确认密码”属性的值。我尝试跟随
我正在使用 ASP.NET Core 3.1 并尝试使用单一模型进行登录和注册。
有什么解决办法吗?我正在学习 .NET Core 和 MVC,因此对这个主题的了解较少。
提前感谢您的帮助。
这个问题可能会在许多线程上回答,但我无法找到特定于我的问题的答案.
问:我从API(以json格式)获取数据,其中所有列都以字符串形式出现并插入到一个表中,该表将所有列作为字符串并用作源表.
现在,我正在尝试将数据从该源转换为目标,并进行所有必要的转换以将数据插入目标表.但十进制(16,8)投射失败.
我在我的端调试问题,并发现在从API获取数据期间,将数据返回到json格式,以某种不寻常的格式转换值.
对于例如0.00007转换为7E-05,这发生在许多其他行上.
我知道我可以在API实现级别修复此问题.但我要求在SQL服务器端解决这个问题.所以我需要一个能将7E-05转换成0.00007的解决方案.
我目前的 SQL 查询是按日期排序的。在 1/6/17 ,我有两个具有不同 id 字段的相同记录。
随着我的date desc排序,我想包括id字段 desc。这样更高的 Id 字段值将与最近的日期一起出现。
Id Date Status
0 1/6/17 8:40 Available
0 1/6/17 8:37 Available
0 1/6/17 8:37 Available
697000 1/6/17 8:37 Completed
700920 1/6/17 8:37 Completed
Run Code Online (Sandbox Code Playgroud)
由于某些原因,Id没有得到排序。我试过了order by date, id desc。order by id desc. 它没有用。
sql-server ×6
t-sql ×5
sql ×4
c# ×2
.net ×1
.net-core ×1
asp.net-core ×1
asp.net-mvc ×1
casting ×1
decimal ×1
encryption ×1
go ×1
left-join ×1
msbi ×1
ssrs-2008 ×1
where-clause ×1