• Yesterday, I ran very strange issue of period got missing from url from System.Uri.

    Problem Define:

    I was running my application on NetFramework 4.7.2.

    I had a url like ‘https://xyz.com/users/anuja./all

    I was trying to convert it into the new Uri(‘https://xyz.com/users/anuja./all’) (Which is a class of System.Runtime), the return Uri was like ‘https://xyz.com/users/anuja/all’.

    Note: period(.) after anuja is missing in return uri

    Research on Internet:

    Everywhere on the internet, I was able to find that this issue no longer exists after .NetFramework 4. But, I was facing it for my. NetFramework 4.7.2 running site.

    I tried to create a demo application of. NetFramework 4.7.2 and with my surprise, I was not able to reproduce it there. So, something was wrong in my application.

    Find Solution:

    When I checked the dll, I found that System dll path was different for both applications. My application was referring older dll of version. NetFramework 4. I checked the web.config file and found that there was a minor difference in system.web > httpRuntime.

    My demo application has targetFramework=”4.7.2” defined in httpRuntime but running application has not. I added it in my application and it started to work fine for me :)

0 Years in
Operation
0 Loyal
Clients
0 Successful
Projects

Words from our clients

 

Tell Us About Your Project

We’ve done lot’s of work, Let’s Check some from here