Web Dev Matters and Me

Web Development Matters - HTML, XML, C#, .NET, AJAX/Javascript(jQuery), CSS, XML-XSLT

ME - LIFE,Philippines, Tokyo, ECE, PhilNITS/JITSE,情報処理, 日本語

things about Philippines, gaming, C# development and web development, how to make money in stock trading

Web Dev Matters and Me

The XML page cannot be displayed - Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. Access is denied. Error processing resource

The XML page cannot be displayed - 
Cannot view XML input using XSL style sheet.
 Please correct the error and then click the Refresh button, or try again later.


 Access is denied. Error processing resource




On my continued experiment on dynamic XSLT website. It seems that the browsers WILL NOT PROCESS XSL stylesheets if the URL in the href attribute is different to the current document's URL because of cross-domain issue. Although I understand that if they don't do this, every pages might end up X-Domain attacked, but having it denied even on same DOMAIN is just absurd...




So, if you got an XML laced with 


< ?xml-stylesheet type="text/xsl" href="http://sitename.com/index.xsl"?>






on any xml documents in http://sitename.com/myxmlfile.xml




the referenced stylesheet will be processed, but if your site does something like SEO optimization and handles specific file by subdomain...




< ?xml-stylesheet type="text/xsl" href="http://internal.sitename.com/index.xsl"?>






this will display for any xml documents under internal.sitename.com/myxmldoc.xml ... 






So, the browsers got a narrow understanding of cross-domains, treating it as cross-URL. It should be called Cross URL instead of cross domain protection.












 

C# - Windows form Combobox displays System.Data.DataRowView Instead of Display Member

I'm getting a query result, in terms of a DataTable/DataSet. Now, the problem here is that, on my ComboBox object, I already specified the display member and the value member. I'm also sure that the datatable/dataset has that column in the result.
 
Although I set all of these properties I still get "System.Data.DataRowView" displayed on all items.

Once an Item is displayed for the first time the value is OK but when I choose another item and the selected Item become inactive, its displayed text would show  "System.Data.DataRowView". 

I tried all the bindings, reset the selected index... but alas, to no avail.


Then, I realized that the part making it display all those System.Data.DataRowView is from the SelectedIndexChanged event. An exception there is preventing the binding to work properly. Correcting the code there fixed it.

Oil stocks gaining, except for PXP?

i had good gains with OV, and probably pxp...but now, my supposedly gain in portfolio is balanced by my loss in pxp. if only i didn't listen to some forums and blogs of technical chartist...


..lesson? believe no one even they are reputed to be a super technical financial analyst.. because your loss will be 100% yours..

FTP Upload using C# The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

This error just bumped into me while working with 2 web hosting company. I had almost identical deployment setup for two website. Then, I have a main FTP account that I use to transfer all the files in the server. But I really don't want to use this FTP account as it has a right to the root folder, so I created another FTP account that only has access to a certain folder. This way, I am setting up a little security on the website.

But when I am test deploying my website, I get errors whenever the GetRequestStream method of the FtpWebRequest object.


The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

Which was weird, because I have done this before on the website with my main FTP account. Whenever I will access the ftp site with explorer, I also can't connect. 

After googling a lot of failed solutions, I decided to try few things on my own. I tried to add folder similar to the folder structure in the root (so it looks like MainFolder/SubFolder/MainFolder/SubFolder) .


Then I tried to run my application again and I'm able to add the file smoothly.
I don't like the workaround because I simply tells me to update the already built code and perform another round of testing..

I hope the web hosting company can still find a way... Workaround is OK, but it is a lame excuse.

Setting Datagridview TexboxCell into multiline mode like a Textbox control

Once again, I'm having my sleepless afterwork stress... so I decided to open my computer and do some dev work to lessen the remaining task before deployment and content writing.

Fortunately, we can also set the texbox like column in datagridview control to be a multiline textbox, without adding codes to cast our controls.. All with the use of designer view. On the datagridview control, we have to locate the Collection property and choose the desired datagridviewtextboxcolumn. From there, we navigate on the DefaultCellStyle property and set the WrapMode to true.

Also, we have to set the AutoSizeRowsMode of the datagridview control to AllCells. 

After this, when we add or type contents to the cell, it will expand automatically. Sweet, isn't it?

FB Connect