Windows AppFabric Server (win2k8) not working with distributed cache client on win2k3 - windows-server-2008

We have windows appfabric cache server on win2k8 server and have installed “Windows Server 2003 Distributed Cache Client” on win2k3 web server from this link .
We are getting below exception while getting the cache object from cache factory.Can anybody help us to understand the cause of exception and its solution? Please note that below exception is not thrown while adding or getting cache data.
Our main purpose is to get & put cache data to windows appfabric server(win2k8) from win2k3 webserver client.
Exception:-
System.Runtime.Serialization.SerializationException: There was an error deserializing the object . Input string was not in a correct format. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value, IFormatProvider provider)
at System.Runtime.Serialization.FormatterConverter.ToInt32(Object value)
at System.Runtime.Serialization.SerializationInfo.GetInt32(String name)
at Microsoft.ApplicationServer.Caching.EvictionConfig..ctor(SerializationInfo info, StreamingContext context)
at ReadEvictionConfigFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserializeInSharedTypeMode(XmlReaderDelegator xmlReader, Int32 declaredTypeID, Type declaredType, String name, String ns)
at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, String name, String ns)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadSerializationInfo(XmlReaderDelegator xmlReader, Type type)
at ReadPolicyConfigFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserializeInSharedTypeMode(XmlReaderDelegator xmlReader, Int32 declaredTypeID, Type declaredType, String name, String ns)
at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, String name, String ns)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadSerializationInfo(XmlReaderDelegator xmlReader, Type type)
at ReadNamedCacheConfigurationFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserializeInSharedTypeMode(XmlReaderDelegator xmlReader, Int32 declaredTypeID, Type declaredType, String name, String ns)
at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, String name, String ns)
at System.Runtime.Serialization.NetDataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
--- End of inner exception stack trace ---
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader)
at Microsoft.ApplicationServer.Caching.Utility.Deserialize(Byte[][] buffers, Boolean checkTypeToLoad)
at Microsoft.ApplicationServer.Caching.RoutingClient.GetCacheProperties()
at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)

Here is the code snippet :-
DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();
List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>(1);
servers.Add(new DataCacheServerEndpoint("localhost", 22233));
configuration.Servers = servers;
DataCacheSecurity security = new DataCacheSecurity(DataCacheSecurityMode.None, DataCacheProtectionLevel.None);
configuration.SecurityProperties = security;
DataCacheFactory factory = new DataCacheFactory(configuration);
DataCache cache = factory.GetCache("default"); // above exception is thrown here

Related

Error while importing flat file "Microsoft.SqlServer.Prose.Import"

I am getting error while inserting flat file into SQL Server. Direct transfer from SQL Server to SQL Server is not possible. Data has to be exported and then imported. Note : Data was exported from SQL server with text qualifier "double quotes" and pipe delimited "|". I tried to re-extract the data using fixed width format still unable to import. Please assist.
Error Message :
Error inserting data into table. (Microsoft.SqlServer.Import.Wizard)
------------------------------
Program Location:
at Microsoft.SqlServer.Import.Wizard.InsertData.ResultCheck(Result result)
at Microsoft.SqlServer.Import.Wizard.InsertData.DoWork()
at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()
===================================
Error inserting data into table. (Microsoft.SqlServer.Prose.Import)
------------------------------
Program Location:
at Microsoft.SqlServer.Prose.Import.BcpSynthesis.InsertIntoDB(String inputFilePath, String tableName, String schemaName, SqlConnection connection, Int32 batchSize, SqlTransaction transaction)
at Microsoft.SqlServer.Prose.Import.BcpProcess.<>c__DisplayClass42_0.<InsertIntoDb>b__0()
at Microsoft.SqlServer.Prose.Import.BcpProcess.ExecuteOperation(Action operation)
===================================
Object reference not set to an instance of an object. (Microsoft.SqlServer.Prose.Import)
------------------------------
Program Location:
at Microsoft.SqlServer.Prose.Import.OutputDataReader.GetValue(Int32 i)
at System.Data.SqlClient.SqlBulkCopy.GetValueFromSourceRow(Int32 destRowIndex, Boolean& isSqlType, Boolean& isDataFeed, Boolean& isNull)
at System.Data.SqlClient.SqlBulkCopy.ReadWriteColumnValueAsync(Int32 col)
at System.Data.SqlClient.SqlBulkCopy.CopyColumnsAsync(Int32 col, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyRowsAsync(Int32 rowsSoFar, Int32 totalRows, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsyncContinued(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsync(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader)
at Microsoft.SqlServer.Prose.Import.BcpSynthesis.InsertIntoDB(String inputFilePath, String tableName, String schemaName, SqlConnection connection, Int32 batchSize, SqlTransaction transaction)

Failed insert or update when add type column long text using NHibernate in VB.NET

I'm using Nhibernate 4 and FluentNhibernate 2.0.3 with db Microsoft Access 2000. I can't save the entry on the DB because i'm getting an error when I go to insert the Note field sending a request HTTP POST for example:
{
"Note": "bla bla bla"
}
NOTE: In the database table, the column "Note" is setted as "LONG TEXT" (Not Required)
Could It be a problem of conversion of data Types?
Here's the stack trace:
NHibernate.Exceptions.GenericADOException: could not insert: [Domain.Destinatari#1773][SQL: INSERT INTO `Destinatari` (Note, IDDestinatario) VALUES (?, ?)] ---> System.Data.OleDb.OleDbException: Errore di sintassi nell'istruzione INSERT INTO.
in System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
in System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
in System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
in System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
in System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
in System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
in NHibernate.JetDriver.JetDbCommand.ExecuteNonQuery()
in NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
in NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)
in NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
--- Fine della traccia dello stack dell'eccezione interna ---
in NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
in NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
in NHibernate.Action.EntityInsertAction.Execute()
in NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
in NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
in NHibernate.Engine.ActionQueue.ExecuteActions()
in NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
Below my mapping code:
Public Class DestinatariMap
Inherits ClassMap(Of Destinatari)
Public Sub New()
MyBase.New
LazyLoad()
Id(Function(x) x.IDDestinatario).GeneratedBy().Increment()
Map(Function(x) x.Note)
End Sub
End Class
Here's my Domain code:
Public Class Destinatari
Private _ID_Destinatario As Integer
Private _Note As String
Public Overridable Property IDDestinatario() As Integer
Get
Return Me._ID_Destinatario
End Get
Set
Me._ID_Destinatario = Value
End Set
End Property
Public Overridable Property Note() As String
Get
Return Me._Note
End Get
Set
Me._Note = Value
End Set
End Property
End Class
Thanks

PlatformNotSupportedException CE7

I have a empty project (compact framework 3.5) for pda. I add a imagelist and i add a image in the list. When i deploy the project at a CE7 device (Motorola MC32N0) i get a PlatformNotSupportedException at the line
this.imageList1.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
The stacktrace is:
at System.Globalization.CompareInfo..ctor(Int32 culture)
at System.Globalization.CompareInfo.GetCompareInfo(Int32 culture)
at System.Globalization.CultureInfo.get_CompareInfo()
at System.Collections.Comparer..ctor(CultureInfo culture)
at System.Collections.Comparer..cctor()
at System.OrdinalComparer.EqualsStringImpl(String x, String y)
at System.StringComparerImpl.Equals(Object x, Object y)
at System.Collections.Hashtable.KeyEquals(Object item, Object key)
at System.Collections.Hashtable.get_Item(Object key)
at System.Globalization.CultureInfo.GetCultureInfoHelper(Int32 lcid, String name, String altName)
at System.Globalization.CultureInfo.GetCultureInfo(String name)
at System.Globalization.CompareInfo.GetSortingLCID(Int32 culture)
at System.Globalization.CompareInfo..ctor(Int32 culture)
at System.Globalization.CompareInfo.GetCompareInfo(Int32 culture)
at System.Globalization.CultureInfo.get_CompareInfo()
at System.Globalization.CultureInfo.GetHashCode()
at System.Collections.Hashtable.GetHash(Object key)
at System.Collections.Hashtable.InitHash(Object key, Int32 hashsize, UInt32& seed, UInt32& incr)
at System.Collections.Hashtable.get_Item(Object key)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture)
at System.Resources.ResourceManager.GetObject(String name)
at SmartDeviceProject5.Form1.InitializeComponent()
at SmartDeviceProject5.Form1..ctor()
at SmartDeviceProject5.Program.Main()
I only get this exception in CE7. Any ideas?
I think MC32xx has only a "core" CE7. I had a similar problem. Have you got installed Compact Framework 3.5 properly. What does the windows\wceload.exe show you? Maybe you have to install this seperately.

Value does not fall within the expected range VB.NET 2012 Clickonce

I m getting crazy... A solution with 8 projects, and suddenly when publishing using ClickOnce and trying to run the app on the client machine appears this error :
*ERROR DETAILS
Following errors were detected during this operation.
* [16/04/2014 7:23:12] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)*
anybody can help me ???? Thanks in advance to all who read this question.

Webview giving Column Does not Exist Error

I am using
MVC 3
VB.NET and
Razor ViewEngine.
I am playing around with WebGrid in my application and it is telling me "failEmList" does not exist.
Below is the code from the calling Function, the View, and the part of the model that it is getting the data from.
FailEmailSends is just a List(of string) and has lines with single entries of email Addresses.
Dim vm As New MassEmailVM
For Each _fail In failEmailSends
vm.failEmList.Add(_fail)
Next
ViewBag.succCount = succCount.ToString
ViewBag.failECount = failEmailCount.ToString
Return View(vm)
View is as follows:
#Modeltype xxxxxxxxxxxxx
#Code
ViewData("Title") = "Mass Emails Sent"
End Code
<table>
<tr><th>Total Sent</th><td>#ViewBag.succCount</td></tr>
<tr><th>Total Fail</th><td>#ViewBag.failECount</td></tr>
<tr><th>Fail Email Addresses</th></tr>
</table>
#code
Dim grid = New WebGrid(Model.failEmList)
End Code
<div id="grid">
#grid.GetHtml(
tableStyle:="grid",
headerStyle:="head",
alternatingRowStyle:="alt",
columns:=grid.Columns(
grid.Column("failEmList", "Email List")
))
</div>
Relevant part of view Model:
Private _failEmList As New List(Of String)
Public Property failEmList() As List(Of String)
Get
Return _failEmList
End Get
Set(ByVal value As List(Of String))
_failEmList = value
End Set
End Property
Any ideas why this is throwing the following error:
System.InvalidOperationException was unhandled by user code
Message=Column "failEmList" does not exist.
Source=System.Web.Helpers
StackTrace:
at System.Web.Helpers.WebGridRow.get_Item(String name)
at System.Web.Helpers.WebGrid.GetTableBodyHtml(IEnumerable`1 columns, String rowStyle, String alternatingRowStyle, String selectedRowStyle)
at System.Web.Helpers.WebGrid.Table(String tableStyle, String headerStyle, String footerStyle, String rowStyle, String alternatingRowStyle, String selectedRowStyle, String caption, Boolean displayHeader, Boolean fillEmptyRows, String emptyRowCellValue, IEnumerable`1 columns, IEnumerable`1 exclusions, Func`2 footer, Object htmlAttributes)
at System.Web.Helpers.WebGrid.GetHtml(String tableStyle, String headerStyle, String footerStyle, String rowStyle, String alternatingRowStyle, String selectedRowStyle, String caption, Boolean displayHeader, Boolean fillEmptyRows, String emptyRowCellValue, IEnumerable`1 columns, IEnumerable`1 exclusions, WebGridPagerModes mode, String firstText, String previousText, String nextText, String lastText, Int32 numericLinksCount, Object htmlAttributes)
at ASP._Page_Views_Admin_MassEmailsSent_vbhtml.Execute() in C:\Users\Skindeep\Documents\Visual Studio 2010\Projects\xxxxxxxxxx\Views\Admin\MassEmailsSent.vbhtml:line 21
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
InnerException:
You may try the following:
#Code
Dim grid = New WebGrid(Model.failEmList)
End Code
<div id="grid">
#grid.GetHtml(
tableStyle:= "grid",
headerStyle:= "head",
alternatingRowStyle:= "alt",
columns:= grid.Columns(
grid.Column(format:= Function(item) item, header:= "Email List")
)
)
</div>
Try this
#grid.GetHtml(
columns: new[] {
grid.Column(format: (item) => item)
}
)
In case it helps someone, in my case I made a copy/paste error, and forgot to change the source when declaring the grid! Once I corrected the first column with the suggestions above, the second column threw the same error.
Dim grid = New WebGrid(Model.WasTheWrongNameHere)