This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpCookie myCookie = new HttpCookie("UserSettings"); | |
myCookie.Expires = DateTime.Now.AddDays(-1d); | |
Response.Cookies.Add(myCookie); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this code is in the DbContext so this is DbContext. | |
var objectContext = (this as IObjectContextAdapter).ObjectContext; | |
objectContext.CommandTimeout = csb.ConnectTimeout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TranDetailExistsCommons = db.JobActivityEstimates.Any(e => e.JobKey == Key && db.TransCommons.Any(j => j.JobActivityEstimateKey == e.Key)); | |
Error: | |
Unable to create a constant value of type 'Amsi.Model.eFinancials.TransCommon'. Only primitive types or enumeration types are supported in this context. | |
--- | |
I still have no explaination of why this query not errors out after converting to DbContext... however, I have modified the query as follows. It returns the same results without getting the error: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports Microsoft.AspNet.SignalR | |
Public Class DocumentConverter | |
Inherits Hub | |
Public Sub ComplexProcess() | |
' Do the work here: | |
System.Threading.Thread.Sleep(2000) | |
Clients.Caller.AddProgress("Step 1 of 5 has completed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XNamespace rootNs = "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"; | |
XNamespace rdNs = "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"; | |
XElement _dataSource = new XElement("DataSource", | |
new XAttribute(XNamespace.Xmlns + "rd", rdNs), | |
new XAttribute("Name", "eFinancials_LOCAL"), | |
new XElement("ConnectionProperties", new XElement("DataProvider", "SQL"), new XElement("ConnectString", connectionString)), | |
new XElement(_rdns + "SecurityType", "DataBase"), | |
new XElement(_rdns + "DataSourceID", dataSourceId) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4/4/2013 3:58:08 PM: Object reference not set to an instance of an object. | |
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder() | |
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arrMemoFieldInfo = new List<SerializationInfo>(); | |
foreach (ListItem li in arrMemoFields) | |
{ | |
arrMemoFieldInfo.Add(new SerializationInfo() { Text = li.Text, Value = li.Value }); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d" | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The bottom row is empty clone the last row and append it to the table | |
var newrow$ = $("tr:visible:last", this).clone(true); | |
newrow$.find(":input") | |
// increment the index in the name of each input field so the are unique | |
.attr({ | |
name: incrementName, | |
id: incrementId | |
}) | |
// run the default method for each default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Innermost Exception: | |
System.Data.SqlClient.SqlExeception | |
{"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a LocalDB installation. Verify that SQL Server Express is properly installed and that the LocalDB feature is enabled.)"} | |
wrapped by: | |
System.Data.ProviderIncompatibleException | |
{"The provider did not return a ProviderManifestToken string."} | |
wrapped by: |