2014-1202

使用如下代码加载css:

<link href="/Content/css/home?v=zhVOIpUNuvCOZhJyBcQWpMlozayor4te6k-pM29wHqI1" rel="stylesheet"/>


报403 - 禁止访问: 访问被拒绝。
您无权使用所提供的凭据查看此目录或页面。


解决方法:

如上链接MVC Bundle的处理规则是:

如果服务器存在/Content/css目录,则按照常规文件请求文件系 阅读全文>>

标签: ASP.NET MVC BundleStyle BundleScript 403错误 阅读:10983
2014-1021

GET方式的直接使用

$file_contents = file_get_contents('http://localhost/operate.php?act=get_user_list&type=json')


POST方式得用下面的(需要开启PHP curl支持)。

$url = 'http://localhost/operate.php?act=get_user_list&type=json';
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $u 阅读全文>>
                
标签: PHP调用接口GET和POST方法 PHP GET POST 阅读:12589
2014-0925

这里示例是Payment Page方式,即跳转到Firstdata网站进行支付

1.申请帐号,配置相关Payment Page

Receipt Page Setup里边设置Relay Response Url,记着开启Relay Response;这个Url是我们自己网站用来更新订单状态的,源码如下:

<?php
require_once("../../../include/common.inc.php");
require_once("../../../users/config.php");
echo"<h2>";
ec 阅读全文>>
                
标签: Payment Page FirstData 国外支付接口 阅读:12833
2014-0505

The type or namespace name 'Schema' does not exist in the namespace 'System.ComponentModel.DataAnnotations' (are you missing an assembly reference?)


报以上错误,添加EntityFramework.dll引用即可

标签: EntityFramework DataAnnotations 阅读:10029
2014-0430

操作XML时报错:The ':' character, hexadecimal value 0x3A, cannot be included in a name.

相关源代码如下:

XNamespace xnamespace = "http://www.sitemaps.org/schemas/sitemap/0.9";
XNamespace xnamespaceForBaiduMobile = "http://www.baidu.com/schemas/sitemap-mobile/1/";
XElement siteMapForArticles = new XElement(xnamespace + "urlset",
     阅读全文>>
                
标签: xml sitemap XElement XNamespace XAttribute 阅读:11653
2014-0403
class ListDistinctDemo
    {
        static void Main(string[] args)
        {
            List<Person> personList = new List<Person>(){
                new Person(3),//重复数据
                new Person(3),
                new Person(2),
                new Person(1)
            };
            //使用匿名方法
            List<Person&g 阅读全文>>
                
标签: IEqualityComparer<T> List C# District Lambda 阅读:15492