实施seo网址时是否有明确的DO和DONT?对于.html网站来说,很多好的做法似乎都很好,但在中型/大型数据库网站上却出现了问题.
AFAIK的网址应该是www.mysite.com/category/page-name-here
如果我希望创建一个内容丰富的站点并且默认类别和页面是数据库驱动的 - 这是否会阻止我将诸如www.mysite.com/about或www.mysite.com/home等页面作为about和主页可能发生冲突
虽然路由引擎很灵活,但上述可行和/或值得吗?
-编辑-
只是详细说明我的问题,是否可以用数据库控制路由引擎?
url包含有意义的描述是一种很好的做法 - 例如 stackoverflow.com/category/mvc和stackoverflow.com/questions/seo-urls-with-asp-net-mvc是好的(而不是stackoverflow.com/category)/9955和stackoverflow.com/questions/734583)
作为一个到期,我想把控制带到另一个层次,让我们说上面的两个控制器(类别和问题),每个显示动态数据可以修改为简单的 stackoverflow.com/mvc和stackoverflow.com/seo- urls-with-asp-net-mvc.
我需要确保我的数据库包含一个表,告诉我前者将作为一个类别路由,后者作为一个问题 - 这可以通过简单的数据库查找来实现,并且需要在Global.asax中实现
我的问题是,这可以实现,潜在的陷阱是什么.
以下两种编码风格有哪些优点和区别......
public void HelloWorld () {
private string _hello;
public string Hello {
get
{
return _hello;
}
set
{
_hello = value;
}
}
}
Run Code Online (Sandbox Code Playgroud)
要么
public void HelloWorld () {
public string Hello { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我的偏好是简单的简单代码,但有兴趣听到意见,因为我看到许多开发人员坚持漫长的路线.
我有一个相当不寻常的问题,我无法在visual studio 2013中使用wsdl.
为了在IE/Chrome/Safari中查看网址,我需要安装.p12和.crt安全证书.
我已将IE设置为不提示,但在Safari中我看到以下提示:
我想视觉工作室也希望确认证书但无法提示.
尝试在Visual Studio 2013中添加服务引用时,我看到以下错误:
"An error occured (details) while attempting to find services at..."
Run Code Online (Sandbox Code Playgroud)
细节是:
There was an error downloading 'https://xxx/xxx.svc/$metadata'.
The request was aborted: Could not create SSL/TLS secure channel.
Metadata contains a reference that cannot be resolved: 'https://xxx.wsdl'.
Could not establish secure channel for SSL/TLS with authority 'xxx.com'.
The request was aborted: Could not create SSL/TLS secure channel.
If the service is defined in the current solution, try building the solution and adding …Run Code Online (Sandbox Code Playgroud) 我有非常简单的代码解释自己.
List<string> Files = new List<string>( Directory.EnumerateFiles(PathLocation));
Run Code Online (Sandbox Code Playgroud)
但是我现在希望让生活变得复杂,我有一个文件对象.
public class File
{
public int FileId { get; set; }
public string Filename { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
是否有一种最佳方法来填充类的字符串属性,即有没有比使用foreach循环或类似方法更好的方法?