WCF request failed >> SetServiceSettings()

service

#1

First of all, thank you for this software - most of the time, it works great :smile:
Everytime I attempt to update my settings, I am getting the following error in the log:

WCF request failed >> SetServiceSettings()
Exception Detail:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://Moonware/Server:settings. The InnerException message was 'There was an error deserializing the object of type System.Collections.Generic.List`1[[Moonware.Common.SerializableSetting, Moonware.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null]]. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 17143.'.  Please see InnerException for more details.

I am running Netcam Studio x64 v. 1.2.0b2 on a Windows SMB 2011 standard. The same error occurred in 1.1.6. The server is running as a service. It is preventing me from changing any of my settings.

Thanks!


#2

Same problem for me using Win Server 2003 and NCS 120b2. First time running after instillation I could change settings, but after a restart of the Win server the settings could not be changed. I hope it is OK in the final release.


#3

@Mikhail_Burilov: Now I don’t remember If we have fixed this before I was travelling last week.

I know that we were investigating this, can you please confirm if we found the root cause and fixed it ?

Thanks


#4

@Admin : No, unfortunately I couldn’t reproduce this issue. We have made an assumption that this may be caused by big logo. So I’ve tried to upload really big BMP image (and turned off built-in resizing) - but with no luck. It uploaded and worked fine.
@henrik : Since you experience these problems, can you provide a little more details? Do you change settings directly in NetcamStudio.X, or connect with client? Is it on the same computer (I mean, client and server you are connecting to)? Which port do you use?


#5

Probably, I do it in a different way. I don’t have 2003 Server, tried on 2008 R2 x64. Right after install and after reboot it works fine. Another question - did you make any specific changes between install and reboot when it started crashing? If so, can you please send me your settings file from “C:\ProgramData\Moonware\Netcam Studio\Server\Server.config” ? It will help a lot.

Thanks!


#6
  • No crashes!
  • Everything is running on the same computer with Server 2003 and .NET Framework 4 Extended and NCS 120b2…
  • Running NetCamStudio X (Server): changes can be made and they are stored correctly.
  • Running NetCamStudio Server and Client: changes can be made in the client. When I click on save the settings pops back to old value. Not saved.
  • Changes saved in NCS X shows up correct in NCS Server and Client.
  • Using original port which I assume is 8100
  • What I wrote about a restart is probably not correct. I was probably using NCS X when setting up everything and then shifted to NCS Server, made a reboot and then tried to use NCS Server and Client which did not work. From that I draw the wrong conclusions. However, what I have written in earlier remarks is very consistent.

I would really like to recommend a change of name. For a beginner and also in explanations it is rather confusing to have NetCamStudio X (Server) and NetCamStudio Server. Why not just use NetCamStudio X. Also, I am not quite sure why the NetCamStudio X (server) in needed.


#7

Netcam Studio X and Netcam Studio Service have the same function: acting a server for Netcam Studio.

The difference is that Netcam Studio Service has no user interface and runs in the background (therefore it’s mandatory to use Netcam Studio Client). Netcam Studio X offers an interface and therefore it combines both Server + Client in a single application (like webcamXP and most surveillance softwares do) and do not require to use Netcam Studio Client from the same computer.


#8

The problem seems to be at time of loading the settings not saving them so as Mikhail said, providing us with the faulty settings (the ones existing when the error occurs) would help us to understand.

Next time you see this error (and before quitting the application), please upload here the file Server.config located in C:\ProgramData\Moonware\Netcam Studio\Server

Hopefully it will allow us to reproduce, understand and fix.


#9

@adamschoenemann Do you also have only .NET 4.0 installed (not .NET 4.5) ?

Maybe that’s another side effect of not having .NET 4.5 and why we cannot replicate the problem here…


#10

.NET 4.5 is not available for server 2003. On your web you state this:
.NET Framework 4.0: .NET Framework 4.0 (Windows XP, Server 2003) or .NET Framework 4.5 (Windows Vista, 7, 8, Server 2008, Server 2012)


#11

I’m using the Client to connect to the service (in this case running on the same box). The error happens consistently, everytime I attempt to save settings.

Here is the [Server.config file][1].

I don’t have .NET 4.5 installed, but will try and see if it helps.
[1]: http://pastebin.com/jMcuwurr


#12

FYI: on server 2003 it is located in C:\Documents and Settings\All Users\Application Data\Moonware\Netcam Studio\

I also did this experiment:

  • running NCS Service and client: in Recordings changed from super fast to slow. Saved and it popped back to super fast.
  • opened NSC X and the setting was super fast.

Attached is the file Server.config. Ext config is not allowed ?


#13

I know and we are trying to keep support for operating that have reached end-of-life from MS side. We already had to change the way the library is stored so that it works with .NET 4.0 but it was without expecting other side effects at other places.


#14

Thanks, we’ll have a look and see if it allows us to reproduce.

Please check if .NET 4.5 resolves the problem on your end.


#15

You find Server.config at


#16

Can you please try to:

  • Stop Netcam Studio Service
  • Edit the file C:\Program Files (x86)\Netcam Studio\NetcamStudio.Service.exe.config
  • Search for maxStringContentLength=“8192” (located in netTcpBinding, readerQuotas)
  • Replace by maxStringContentLength=“524288”
  • Restart Netcam Studio Service and give it another try

if the problem is while using Netcam Studio X, do the same in NetcamStudioX.exe.config

Actually, even with the provided .config files, I couldn’t reproduce so maybe it’s not considered in .NET 4.5 but may work for 4.0


#17

Same result, but I get this error message, server2003 and .NET 4:

WCF request failed >> SetServiceSettings()
Exception Detail:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://Moonware/Server:settings. The InnerException message was ‘There was an error deserializing the object of type System.Collections.Generic.List`1[[Moonware.Common.SerializableSetting, Moonware.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null]]. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 14036.’. Please see InnerException for more details.

The quota of 8192 is still there, but it should be 524288 ?


#18

I’ve found how to fix this.
Do what Steve suggested, but instead of replacing maxStringContentLength, find “< textMessageEncoding messageVersion=“Soap12” >” in service config file NetcamStudio.Service.exe.config
Replace it with:

      <textMessageEncoding messageVersion="Soap12">
	          <readerQuotas maxDepth="32" maxStringContentLength="524288" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
  </textMessageEncoding>

#19

Excellent my Dear Watson, it works! ;). At least it do not generate errors. Don’t forget this code in the final release! ;).

Now I have another one for you. Rotate the image 90 degrees! Very useful when having a cam monitoring a narrow street and rotating the cam 90 degrees. Then you need to rotate the image electronically 90 degrees. Today we have “only” 180 deg. I know now that everything is possible ;). Have a great day!


#20

I’ll try this out when I get back to work, and report back :slight_smile: