Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > SQL query Error (The remote server returned an error: (404) Not Found) View modes: 
User avatar
Member
Member
mohamed.taha-acumenholding - 1/10/2012 1:54:53 PM
   
SQL query Error (The remote server returned an error: (404) Not Found)
Hi Guys,
I am trying to get some queries from a SQL server that contains a news to display in a simple News template but Kentico cannot read anything form the SQL server and returning me this Error
Message: The remote server returned an error: (404) Not Found.
Stack Trace:
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName)
at CMS.Controls.XMLDataSource.GetDataSourceFromDB()

also when I am connecting to the SQL database using third party application it does work and getting data. I have attached for you guys the Code and the Transformations also a snapshot from the third party application please help

User image
User image
User image

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/12/2012 5:49:00 AM
   
RE:SQL query Error (The remote server returned an error: (404) Not Found)
Hello,

Could you pleas post the relevant source lines, how you are initializing the database connection and how you are retrieving the data? Additionally, please re-post the images by uploading them somewhere online, like imageshack.us.

Best regards,
Boris Pocatko

User avatar
Member
Member
mtaha-acumenholding - 1/15/2012 2:26:25 AM
   
RE:SQL query Error (The remote server returned an error: (404) Not Found)
Hi Boris,

thanks alot for your interest, I am initializing the data using SQL server authentication and retrieving it using a SQL data source web part and you will find the need info on the uploaded images


Third Part Application
http://shareimage.org/images/1fmvg2bnebvbdbzfqe8w.png

SQL Data Source Web Part
http://shareimage.org/images/aowo6jxvow10r68yxbxd.png

Transformations

http://shareimage.org/images/0netwgsrpcxquoo9a2lb.png

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/16/2012 1:44:25 AM
   
RE:SQL query Error (The remote server returned an error: (404) Not Found)
Hello,

At first, I've noticed you are using quite an old version of Kentico:

5.5.3996

Could you please at least try to apply the latest hotfix for the 5.5 R2 version? The hotfixes can be found here.

Additionally, could you please describe your setup? Are you trying to setup this Data Source Web part on a live site outside your network? If yes, then your datasource web part doesn't seem to be configured correctly, since you are using an IP address, which is usually used to connect to an computer inside your network (192.168.2.43). Please check with your system administrator, if that's the correct IP address you need to use to connect to your second SQL database.

Best regards,
Boris Pocatko

User avatar
Member
Member
mtaha-acumenholding - 1/16/2012 5:21:25 AM
   
RE:SQL query Error (The remote server returned an error: (404) Not Found)
my Kentico Version now is v5.5.4311 R2 and all my servers exist on the local environment and I did not get "you need to use to connect to your second SQL database."

by the way i tried to test the website after the upgrade but sill no luck

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/17/2012 7:13:22 AM
   
RE:SQL query Error (The remote server returned an error: (404) Not Found)
Hello,

I've checked with our developer and he correctly pointed out, that the error message is from a XML Datasource web part, however, the screenshot you've posted is from a SQL data source web part.

Best regards,
Boris Pocatko