複製虛擬機後,由於CentOS會記住Mac Address,但是重新啟動後會配發一個新的Mac Address 並且新增一個eth1的網卡。
解決方式為將失效的eth0的Mac Address改為新的Mac Address,新的Mac Address在路徑:
[/etc/udev/rules.d/70-persistent-net.rules]中
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:d4:99:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
只要將eth0的Mac Address改為 00:0c:29:d4:99:d3
並且重新啟動網路 >service network restart
標籤
ASP.NET MVC
(29)
Visual C#
(15)
JQuery
(10)
Plugins
(8)
JQuery Plugins
(6)
JavaScript
(6)
MySQL
(5)
CSS
(4)
LinQ
(4)
Mac OS
(4)
CentOS
(3)
Design Pattern
(3)
Entity Framework
(3)
IIS
(3)
Python
(3)
Windows
(3)
php
(3)
Docker
(2)
LAMP
(2)
SQL Server
(2)
WCF
(2)
.NET
(1)
.NET Core
(1)
AWS
(1)
Browser
(1)
GIS
(1)
IE
(1)
Internet Security
(1)
Linux
(1)
Platform
(1)
React
(1)
SEO
(1)
Testing
(1)
VMware
(1)
Windows 7
(1)
cookie
(1)
curl
(1)
laravel
(1)
phpBB
(1)
session
(1)
中古屋
(1)
透天
(1)
閒言閒語
(1)
面試
(1)
鳥松
(1)
2012年12月19日 星期三
2012年9月4日 星期二
[Windows] MSDN開放下載 Windows Server 2012正式版
2011年11月10日 星期四
[JavaScript] function statement requires a name
function statement requires a name
---
在ASP MVC中使用 Ajax:
@Ajax.ActionLink("刪除", "Delete", new { id = item.Id },
new AjaxOptions()
{
HttpMethod= "Delete",
Confirm="你確定要刪除嗎?",
OnSuccess = "function() { alert('hello'); }"
})
改為下面這樣就好了:
OnSuccess = "(function() { alert('hello'); })()"
Reference :
---
在ASP MVC中使用 Ajax:
@Ajax.ActionLink("刪除", "Delete", new { id = item.Id },
new AjaxOptions()
{
HttpMethod= "Delete",
Confirm="你確定要刪除嗎?",
OnSuccess = "function() { alert('hello'); }"
})
改為下面這樣就好了:
OnSuccess = "(function() { alert('hello'); })()"
Reference :
Javascript anonymous functions in Firefox 7
2011年11月9日 星期三
伺服器 '' 上的 MSDTC 無法使用。
昨天懶得重開電腦,就直接休眠了,結果今天早上run程式的時候就發生這個錯誤:
'/' 應用程式中發生伺服器錯誤。
伺服器 'XX\SQL2008R2' 上的 MSDTC 無法使用。
描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。例外詳細資訊: System.Data.SqlClient.SqlException: 伺服器 'XX\SQL2008R2' 上的 MSDTC 無法使用。
原始程式錯誤: ...
---
後來發現是 Distributed Transaction Coordinator (MSDTC) 這個服務停止了,所以只要有包含交易(Transaction)的區段都會出錯,把服務重新啟動一次就好囉。
2011年10月17日 星期一
[LinQ] 將多個判斷條件合併,使用And或Or
我希望可以使用And與Or來合併LinQ語法中的判斷式,例如:
//名稱包含關鍵字
Expression< Func< Models.Product, bool>> productNameContainsKeyword =
c => c.Name.Contains(input.Keyword);
//價格大於多少
Expression< Func< Models.Product, bool>> productPriceMoreThan =
c => c.Price >= priceFrom.Value;
//兩個條件And
var result = (from s in contex.ProductSet.Where(
productDecriptContainsKeyword.And(productPriceMoreThan)
)
Cool~
很好玩的實作方式:
[ASP.NET MVC] 定義自訂欄位驗證屬性並且在clinet端驗證
perform the client side validation for custom attribute
欄位自己驗證,不須其他欄位,看這個:
驗證中必須含有其他欄位,很不錯的解答:
---
2011年10月16日 星期日
[ASP.NET MVC] 快取( Cache ) 的機制
MVC 中有內建屬性可以控制是否要再Client端作cache,也有Server-cache的機制,如果我們是某個partialView要快取在server,則直接在Action上使用:
[System.Web.Mvc.OutputCache(Duration = 60)]
或者直接操作比較底層的東西:
---
保哥這篇很棒:
訂閱:
文章 (Atom)
