# Message size on relativity not taking

**URL:** https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120
**Category:** Relativity Server
**Created:** [January 9, 2020, 4:45pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120 "2020-01-09T16:45:02Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![hamberg](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/h/8797f3/32.png) [@hamberg](https://talk.remobjects.com/u/hamberg)
#### Post date: [January 9, 2020, 4:45pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/1 "2020-01-09T16:45:02Z")

</div>

Hello,

I first setup a simple .net client that works talking to Relativity at 7099. I found that one of my queries was getting a message size limit was reached while trying to decompress the message: 5242880. So I went into the Admin tool and from the Network Settings and I change both the MaxDecompressedMessageSize and the MaxMessageSize to 52428800 from 5242880 and saved it. I verified that its was saved in the C:\ProgramData\RemObjects Software\Relativity\Relativity.config. I also Stopped and restarted the relativity server. When I ran it again I still get the same error message showing the old value of 5242880.

So now I was thinking that it just not taking that config file and loading some default so I opened a web browser and went to the relativity main page: [http://localhost:7099](http://localhost:7099) and it shows me the channel type Simple Http Channel (TLS protected). I then went into the admin tool and changed the channel type to superhttp at 8099 and saved it and refreshed the browser and it showed SuperHttp Channel (TLS protected). So I know that it is taking the changes. I also verified these changes in the Relativity.config as I did above.

I then pointed my web browser to a secure [https://localhost:7098](https://localhost:7098) and it worked showing the changes in default http info page. It also worked at [https://localhost:8099](https://localhost:8099) showing the changes in the default info page.

I also went back to my client right clicked and update the Table Definition Classes to superhttps://MYPCNAME:8099/bin and ran my client app but I still get the same error message and it shows the value of 5242880 which is the original default value not the 52428800. I also tried unchecking EnforceMessageSize and I unchecked UseCompression but I still get that error.

This is the query I an running. Pretty much the boilerplate that the tool generates except with a where and order by clause.

public void LoadFromServer(string lastname)  
{  
this.AddToLog(“Downloading data from the server.”);

```
        this.remoteDataAdapter.CancelChanges();
        IQueryable<myTable> clientsQuery = from c in this.remoteDataAdapter.GetTable <myTable>() where c.LastName.Contains (lastname) orderby c.LastName select c;
        this.Context.myTable = clientsQuery.ToList();

        this.AddToLog("Data has been downloaded from the server.");
       
    }

```

I am running c# with DA Link, Relativity v10.0.0.1463 and the same version for DA and RO. .Net Runtime is v4.0.30319.42000.

What can I do to increase this?

Thanks,

Howie

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [January 9, 2020, 5:18pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/2 "2020-01-09T17:18:06Z")

</div>

Hello

What is the exact error message?

---

<div class="post-metadata">

### Author: ![hamberg](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/h/8797f3/32.png) [@hamberg](https://talk.remobjects.com/u/hamberg)
#### Post date: [January 9, 2020, 5:27pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/3 "2020-01-09T17:27:02Z")

</div>

Error happened: Message size limit was reached while trying to decompress the message: 5242880

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [January 9, 2020, 5:41pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/4 "2020-01-09T17:41:43Z")

</div>

Ah. It seems you forgot to do one more very important thing: to adjust client-side settings as well. . Assuming you are using the default client project template you need to open the DataModule component in designer and adjust properties of message and clientChannel components.

---

<div class="post-metadata">

### Author: ![hamberg](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/h/8797f3/32.png) [@hamberg](https://talk.remobjects.com/u/hamberg)
#### Post date: [January 9, 2020, 5:50pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/5 "2020-01-09T17:50:03Z")

</div>

Thank you Anton,

I changed that but now it comes back with:

Error happened: An exception occurred on the server: Session could not be found.

And now if I change is back I still get this message of “Error happened: An exception occurred on the server: Session could not be found.”

I then created a new project with the defaults that goes to [http://mypc:7099/bin](http://mypc:7099/bin) and it just works. Now I make a backup of this test project.

I then change clientChannel in the DataModules.cs to [https://mypc:7098/bin](https://mypc:7098/bin) and it gives “Error Happened: The remote certificate is invalid according to the validation procedure.”

I then go back and change the clientChannel in the DataModules.cs to [http://mypc:7099/bin](http://mypc:7099/bin) and try what worked before and it now fails with the message of “Error happened: An exception occurred on the server: Session could not be found.” I even tried stopping and restarting Relativity and the same error. I then go back to the backup I just made and copy over the now broken one and run it and it just works.

This makes no sense to me as I am only changing the TargetUrl on the ClientChannel and once it is broken it no longer works unless I restore it. I tried to just delete the bin and obj folders on the project but that didn’t fix it. What else is being written to when you change that in the ide as it does not seem to be something with Relativity.

FYI: I am using the “Generate Cert” from the admin tool to do the TSL.

I also did the same test with only changing the message MaxMessageSize and the MaxDecompressionMessageSize and leaving the URL to just [http://mypc:7099/bin](http://mypc:7099/bin) and the same issue happens. What I mean is I copied the good project, run it and it gives data. I then change on the client the message Max values and then it gives the Session could not be found error. So the error has nothing to do with SSL/TSL or anything like that.

Thanks,

Howie

---

<div class="post-metadata">

### Author: ![hamberg](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/h/8797f3/32.png) [@hamberg](https://talk.remobjects.com/u/hamberg)
#### Post date: [January 9, 2020, 9:41pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/6 "2020-01-09T21:41:24Z")

</div>

Hi Anton,

I have since put back the backup project and this time instead of using the visual studio ui to change the vales of MaxDecompressedMessageSize and the MaxMessageSize to 52428800 I opened DataModule.Designer.cs in a text editor and added those values. I then opened the project and it worked with no issues with the larger transfer size. It appears this is breaking in both Visual Studio 2017 & 2019 when the control writes out the DataModule.Designer.cs.

Thanks,

Howie

---

<div class="post-metadata">

### Author: ![hamberg](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/h/8797f3/32.png) [@hamberg](https://talk.remobjects.com/u/hamberg)
#### Post date: [January 9, 2020, 10:27pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/7 "2020-01-09T22:27:34Z")

</div>

Hi Anton,

After I looked through what was written out I seen that it added a Login needed but that was what was not happening. I added a login to the code before I call the data service call and now the sample works using the visual studio ui and changing the property values. So whatever is the base (generic) template that is made from the project wizard will have this issue whenever someone generates a DA project and then runs the code to see it work but once they change any value they will be stuck trying to figure out why it was working before when I it just failing because a logon was now needed and not happening. They will just need to go to the clientChannel events and assign the ClientChannel\_OnLoginNeeded. Hope this post helps anyone who runs into this.

Thanks,

Howie

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [January 10, 2020, 9:36am UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/8 "2020-01-10T09:36:00Z")

</div>

Thanks for the report. I’’ fix that ASAP

As for

> [@hamberg](#):
>
> I then change clientChannel in the DataModules.cs to [https://mypc:7098/bin](https://mypc:7098/bin) and it gives “Error Happened: The remote certificate is invalid according to the validation procedure.”

This is expected. The certificate generated by Relativity is self-signed. Client apps should not trust such certificates by default.

You need to explicitly tell the client code that this particular certificate is allowed: [Handling Self-Signed Certificates (.NET)](https://docs.remotingsdk.com/Clients/Tasks/HandlingSelfSignedCertificates/NET/)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 10, 2020, 9:36am UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/9 "2020-01-10T09:36:04Z")

</div>

Thanks, logged as [bugs://83761](https://www.remobjects.com/portal/bugs/?id=83761)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 10, 2020, 9:36am UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/10 "2020-01-10T09:36:24Z")

</div>

Thanks, logged as [bugs://83762](https://www.remobjects.com/portal/bugs/?id=83762)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 14, 2020, 5:15pm UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/11 "2020-01-14T17:15:52Z")

</div>

[bugs://83762](https://www.remobjects.com/portal/bugs/?id=83762) got closed with status fixed.

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 15, 2020, 10:56am UTC](https://talk.remobjects.com/t/message-size-on-relativity-not-taking/21120/12 "2020-01-15T10:56:51Z")

</div>

[bugs://83761](https://www.remobjects.com/portal/bugs/?id=83761) got closed with status fixed.
