相对于asp.net web配置中的
<httpModules>
<add name="FluorineGateway" type="FluorineFx.FluorineGateway, FluorineFx"/>
</httpModules>
在asp.net mvc3下需要移动到
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="FluorineGateway" type="FluorineFx.FluorineGateway, FluorineFx" />
</modules>
</system.webServer>
否则会报faultCode:Client.Error.MessageSend faultString:'Send failed'
faultDetail:'Channel.Connect.Failed error NetConnection.Call.BadVersion: :
url: http://localhost/Gateway.aspx
的错误
默认的以"metadata=res://*/ "开头的连接串包含了对象的键信息,
View Code
2 <Key>
3 <PropertyRef Name="UserID" />
4 </Key>
5 ...
所以在类中不必加[Key]等属性,这种方式对于DataBase First方式显得非常重要,每次更新数据库后,类会重新生成,如果用普通的连接串则会报
System.Data.Edm.EdmEntityType: : EntityType 'table' has no key defined. Define the key for this EntityType
System.Data.Edm.EdmEntitySet: EntityType: The EntitySet table is based on type table that has no keys defined.
http://ccboy.cnblogs.com/archive/2004/07/26/27363.html
http://www.microsoft.com/downloads/details.aspx?FamilyId=B6D3A791-C3BE-4D53-B20D-DFBE4B1269CE&displaylang=en
http://www.cnblogs.com/ccboy/archive/2004/10/09/50326.aspx
做权限管理的时候遇到的问题,想让明细权限按模块名称纵向排列后再绑定到DataGird,解决方法如下:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[T_Sys_Right_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[T_Sys_Right_Info]
GO
CREATE TABLE [dbo].[T_Sys_Right_Info] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[权限名称] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[模块名称] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[菜单名称] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[权限地址] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[模块序号] [int] NOT NULL ,
[菜单序号] [int] NOT NULL
) ON [PRIMARY]
GO

<script>2
function calc(o)3


{4
if(Number(o)<2)5

{6
return o;7
}8
var arr=new Array(0,1);9
for(var i=1;i<Number(o);i++)10

{11
arr[1]=arr[0]+arr[1];12
arr[0]=arr[1]-arr[0];13
}14
return arr[1];15

16
}17
</script>18
月份:19
<input id="input">20
结果:21
<input id="result" >22
<input type=button value="Calc" onclick="result.value=calc(input.value)">23



