我已成功将一个文件X.ashx及其组件(.cs等)添加到项目中。
结构是这样的:
解决方案Z
项目Y
文件夹布局
子文件夹也命名为Y
X.ashx
SO the website has an address http://generic/SitePages/Home.aspx for the main file
I would think that one would use something like
http://generic/Y/Layouts/Y/x.ashx as the URL
我尝试了各种排列,
但我无法让它正常工作。
有谁知道文件夹结构如何映射到网址?
我正在使用Visual Studio 2012,这适用于SharePoint项目。
另外,由于使用了模板,我的特定项目没有web.config ....
有人知道VS2012中有一个很好的可下载项目/模板。我尝试过搜索,但大多数项目都没有这样的模板。
提前致谢!
答案 0 :(得分:1)
假设您将.ashx文件部署到14配置单元中的layouts文件夹,那么它应该是这样的:
http://yourdomain/SitePages/_layouts/Y/x.ashx
或
http://yourdomain/_layouts/Y/x.ashx
Layouts文件夹在网址
中被引用为_layouts