Comments (11)
In that case we need to find what id got serialized and validate that they can deserialize again.
TBH I don't know anything about these ids. It was a community contribution and has been maintained by external devs so the more info you can find the greater chance it can get resolved
from microsoft.sqlserver.types.
@AndyBates6668 fix for this issue is in #55
from microsoft.sqlserver.types.
Here's a test that passes for full framework and fails in .net core:
public void TestWrongSerialization()
{
var h = SqlHierarchyId.Parse("/3.1/");
var ms = new MemoryStream();
h.Write(new BinaryWriter(ms));
var value = ms.ToArray();
CollectionAssert.AreEqual(value, new byte[] { 0x81, 0x60 });
}
Looks like it's fixed in #55
from microsoft.sqlserver.types.
A small testmethod the shows the problem would be awesome. If you clone the repo and add it to the test class, the test should pass for .net framework (as that runs against official libraries) and fail against .net core.
from microsoft.sqlserver.types.
As I say I'm not sure what the string was that generated that binary data. The HierarchyId class obviously generated it but it fails to deserialize in both .net framework and the .net core builds. I'm doing some more digging so will report what I turn up. Is it possible to decode the binary data or at least identify what the hierarchy id is (or even part of it)?
from microsoft.sqlserver.types.
As I say we're using the library and the test team caused invalid serialised hierarchy identifiers to be generated and dropped into the SQL database. I'll see if I can reproduce and get the source identifiers for these or do some more digging to see how they were generated.
from microsoft.sqlserver.types.
There are 2 fixes I'm interested in seeing released. This plus the GetDescendants issue. Do we know when a pre-release/release can be completed for further testing? Thanks Andy
from microsoft.sqlserver.types.
What is the process for the PRs for resolving issues 46 and this issue to be completed? We're using the code and seeing this issue more frequently so would like to get the fixes in place. Many thanks Andy
from microsoft.sqlserver.types.
The process is to download the source code and build it yourself - at least until I don't feel burnt out and again have the energy to dig into these PRs, test them, and release a new version.
from microsoft.sqlserver.types.
@dotMorten thank you for your hard work. If it helps, I did exactly that - downloaded the code from PR #55 branch and using it in production right now and everything is working fine so far
from microsoft.sqlserver.types.
Try v1.3.0 that have the #55 code.
from microsoft.sqlserver.types.
Related Issues (20)
- ToString() of SqlHierarchyId does not return "NULL" when IsNull == true HOT 1
- GetDescendant for a simple range fails with a HierarchyIdException HOT 2
- Throw HierarchyIdException instead of ArgumentException in GetDescendant method
- Some Geography cannot be deserialized. HOT 4
- When using Microsoft.Data.SqlClient an InvalidCastException will be thrown HOT 3
- Could not load file or assembly Microsoft.SqlServer.Types HOT 13
- SqlHierarchyId Write/Read roundtrip causes data corruption HOT 9
- System.Data.SqlClient needs a version bumb from 4.5.1 to 4.8.3 HOT 4
- assembly load error HOT 4
- DataReader.GetFieldType returned null HOT 10
- MultiPoint issue? HOT 2
- Specified type is not registered on the target. HOT 1
- Referenced assembly 'Microsoft.SqlServer.Types, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name
- Fill DataTable throws DataReader.GetFieldType null
- Insert to SQL Server throws exception - `Specified type is not registered on the target server`. HOT 1
- Using Microsoft.Data.SqlClient 5.0.1 causes System.TypeLoadException: Could not load type 'Microsoft.Data.SqlClient.Server.IBinarySerialize' HOT 10
- Security Vulnerability: https://github.com/advisories/GHSA-8g2p-5pqh-5jmc HOT 7
- Upgrade from Framework to Standard HOT 2
- STIsValid returning incorrect result for parameterized query HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft.sqlserver.types.