我是Sharepoint Server的新手,我们是否有任何实用程序可以从ASP.NET应用程序上传文件.
你能提供宝贵的答案吗?
是否可以将表格映射到自身?
例如
Table:
ConditionId
ConditionName
...
...
ParentConditionId
Run Code Online (Sandbox Code Playgroud)
我们可以在其中有许多ParentConditionIds,每个映射到相同的ConditionId.
我尝试了一对多的映射,但是在没有孩子时我遇到了错误.
我试图遍历SPListItem.Versions集合以查找最新批准的列表项.
我的列表项有三个版本:前两个是批准的,最后一个是草稿.但我的代码说他们都在选秀中!请帮忙!
// Iterate through all versions
for (int index = 0; index < item.Versions.Count; index++)
{
SPListItem versionedItem = item.Versions[index].ListItem;
// Check if moderation information is set to approved
if (versionedItem.ModerationInformation.Status.Equals(SPModerationStatusType.Approved))
{
// We found an approved version!
itemFound = versionedItem;
}
}
Run Code Online (Sandbox Code Playgroud) 我有一个SQL Azure实例设置,可以连接到它,没有SQL Server Management Studio的问题.但是,当我的应用程序尝试连接时,会发生此错误:
建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称是否正确,以及SQL Server是否配置为允许远程连接.(提供程序:SQL网络接口,错误:26 - 查找指定的服务器/实例时出错)
我正在使用Entity Framework Code First 4.1和ASP.NET MVC 3.我的应用程序最初是使用SQL Express成功开发的.现在我正在使用本教程将数据库移动到SQL Azure(该应用程序最终将移动到那里,但开发仍在继续).
既然SSMS工作正常我猜它归结为web.config?我已经尝试了连接字符串名称的每个组合:
<connectionStrings>
<add name="ApplicationServices" connectionString="Server=tcp:suppressed.database.windows.net,1433;Database=EventsTest;User ID=suppressed;Password=suppressed;Trusted_Connection=False;Encrypt=True;PersistSecurityInfo=True;" providerName="System.Data.SqlClient" />
<add name="DomainContext" connectionString="Server=tcp:suppressed.database.windows.net,1433;Database=EventsTest;User ID=suppressed;Password=suppressed;Trusted_Connection=False;Encrypt=True;PersistSecurityInfo=True;" providerName="System.Data.SqlClient" />
<add name="Events.DataAccess.EntityFramework.DomainContext" connectionString="Server=tcp:suppressed.database.windows.net,1433;Database=EventsTest;User ID=suppressed;Password=suppressed;Trusted_Connection=False;Encrypt=True;PersistSecurityInfo=True;" providerName="System.Data.SqlClient" />
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)
我也尝试过Wireshark,我对此知之甚少,但似乎建议了一些活动(192.168.1.101是我的机器,207.46.63.13是SQL Azure服务器):
1 0.000000 192.168.1.101 207.46.63.13 TCP [TCP segment of a reassembled PDU] 2 0.116269 207.46.63.13 192.168.1.101 TCP ms-sql-s > bmc-net-adm [ACK] Seq=1 Ack=2 Win=8444 Len=0 3 2.091928 192.168.1.101 207.46.63.13 TCP [TCP segment of a reassembled PDU] 4 2.209371 …
asp.net-mvc entity-framework connection-string azure azure-sql-database
我正在关注Web API 2中的属性路由文章,尝试通过URI发送数组:
[HttpPost("api/set/copy/{ids}")]
public HttpResponseMessage CopySet([FromUri]int[] ids)
Run Code Online (Sandbox Code Playgroud)
这在使用基于约定的路由时起作用:
http://localhost:24144/api/set/copy/?ids=1&ids=2&ids=3
Run Code Online (Sandbox Code Playgroud)
但是使用属性路由它不再有效 - 我找不到404.
如果我试试这个:
http://localhost:24144/api/set/copy/1
Run Code Online (Sandbox Code Playgroud)
然后它工作 - 我得到一个元素的数组.
如何以这种方式使用属性路由?
我是第一次写计时器工作.我正在关注可以通过谷歌搜索获得的示例作为我的参考.
在许多此类文章中,我遇到了计时器作业功能被激活到网站集级别或站点级别.
我觉得这很奇怪,因为特定的Web应用程序只能有一个计时器作业实例.
是不是所有计时器作业功能都应限定为Web应用程序?
我在这里错过了什么吗?
我想登录到一个Sharepoint门户,它会打开一个登录对话框但是正在使用NTLM身份验证.如何修改C#中的HTTP标头以成功登录请求?我假设我需要对门户网站登录部分中的页面进行HTTPWebRequest并发布HTTP头集合?
我正在学习F#,因为我想写一个词法分析器和解析器.我对这种处理有一点经验,但确实需要正确地学习它和F#.
在学习F#的lexing/parsing功能时,学习lex和yacc是否足够?
或者是否存在一些差异,这意味着lex/yacc的代码将无法与fslex和fsyacc一起使用?
using(DataContext db = new DataContext ())
{
var result = db.SomeTable.ToList();
return result;
}
Run Code Online (Sandbox Code Playgroud)
问题是在我返回结果后,连接被关闭,因为它关闭了,当我试图访问任何子元素时它会崩溃.发生这种情况是因为延迟加载设置为True(默认值)它永远不会在使用之前加载子关系,并且在关闭连接后我开始使用它们.那么解决这个问题的最佳方法是怎样的呢?
我试图关闭延迟加载,但它没有加载任何子关系表.
sharepoint ×4
asp.net ×2
c# ×2
animation ×1
asp.net-mvc ×1
azure ×1
dom ×1
entity ×1
f# ×1
fslex ×1
fsyacc ×1
jquery ×1
lex ×1
moss ×1
ntlm ×1
routes ×1
splistitem ×1
timer-jobs ×1
versioning ×1
yacc ×1