Help with querystring 404 error messages

Hello, I have been getting several thousand error messages each day where the cause of the problem looks similar to this:

Offending URL: http://www.mysite.com/Product.aspx?PId=c3f05611-0694-45a0-885b-ed0d7d8985d4/favicon.gif
Source: mscorlib
Message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
Stack trace: at System.Guid..ctor(String g) at SEI_Products.Get_dsUserProduct(String ProductId) at

or

Offending URL: http://www.mysite.com/Product.aspx?PId=c3f05611-0694-45a0-885b-ed0d7d8985d4/downloads_walpapers.php
Source: mscorlib
Message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
Stack trace: at System.Guid..ctor(String g) at SEI_Products.Get_dsUserProduct(String ProductId) at Controls_ShoppingCart_Product.GetProduct() at

or

Offending URL: http://www.mysite.com/Product.aspx?PId=c3f05611-0694-45a0-885b-ed0d7d8985d4/sado9/zldo.php
Source: mscorlib
Message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

I think someone is linking to a product from their website to ours with a query string like this:
http://www.mysite.com/Product.aspx?PId=c3f05611-0694-45a0-885b-ed0d7d8985d4

At first I thought is was google bot or similar but I'm usnsure. Could be Iframing... Is there something I can do to prevent this?

Does anyone have a clue where I should start looking to sovle the problem?
gogetsomeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
What does "Get_dsUserProduct" look like?
gogetsomeAuthor Commented:
Thanks for stopping by!

Get_dsUserProduct

Returns to the view a specific product from the database.

One of our clients has a product link that resides on their site. It looks like this:
http://www.mysite.com/Product.aspx?PId=c3f05611-0694-45a0-885b-ed0d7d8985d4

Which would resolve corectly if the other junk was not appended to the end of the querystring.

From what I have learned from the client is that their site was hacked and had to be taken down. They are now resolving their entire site to
http://www.mysite.com/Product.aspx?PId=c3f05611-0694-45a0-885b-ed0d7d8985d4

Their hacked site seems to be a PHP site. Not sure why I'm getting all these error messages. Could be a setting on their apache server? Is there anything I can do in .net to handle this?



Bob LearnedCommented:
I would think that you could bullet proof the code by detecting invalid GUIDs, and not attempt to process them.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gogetsomeAuthor Commented:
Yes! Thank you so much... sometimes it's the easy things ;-)

This is how I'm dealing with it:

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then

            If Request.QueryString("PId") IsNot Nothing Then
                lblProductId.Text = Request.QueryString.Get("PId")

                Dim ValidGuid As Boolean = CheckGuid(lblProductId.Text)
                If ValidGuid = True Then
                    GetProduct()
                    GetBrandedLandingPage()
                Else
                    Response.Redirect("http://www.mysite.com")
                End If

            End If

        End If

    End Sub
    Public Function CheckGuid(ByVal guidString As String) As Boolean
        Try
            Dim g As New Guid(guidString)
            Return True
        Catch
            Return False
        End Try
    End Function
gogetsomeAuthor Commented:
Awesome!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.