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.

FMAP(Fund Managers Association Meeting) sponsored by Macquarie pumped OV up?

OV moved bullish from 0.052 to 0.055(it even reached 0.056 at some point). This gaved me about 16.67% gain in my portfolio although that gain is just eaten by my position in PXP .... Oh well, there is no room for regrets.



The gloomy days seems to have ended. With the outlook rating given to philippines, foreign funds are flowing in the market. Most bluechips went UP really fast so we can expect a very happy trading days for daytraders.


There is more to come next week, so I might think up of some plan entering stocks that I'm keeping my eye on, other than OIL stocks. But just like what macquarie says. Investing in Oil exploration is a very profitable investment.

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.

Gloomy weather, gloomy news, only OIL is moving UP

The movement of oil price is so fascinating that it affected the whole world's trading market. I'm really pleased with my gains in Philodrill Corp (OV), but somehow my gains is countered by my loss in Philex Petroleum Corp (PXP). They are even making bad news just to make the stock price lower, but I'm planning to cut my losses here and move on. I might be regretting to have bought OV instead, but again... regrets in stock market is a SIN.

The Philippines is barraged by different low pressure areas, sometimes getting stronger to be declared as typhoon. It was all rainy day, and my Globe internet connection eventually disconnect whenever a strong pouring of rain would suddenly drop. I get tired explaining this to the CS of globe. I hope they would try their own product to know it well and seek for improvement.


RFM getting pumped again at the closing. 2M worth of shares, WOW! It might be a trap too, but I might put a little here, so I might plan my exit on my losing PXP :(


I really wanted to finish up my Blogmanager app. A window application that will help me post on the website I'm working on at the moment. Others may think it was like inventing a wheel when developing a CMS, but I think sometimes re-making the wheel is what exactly developers need to have a better understanding of something :). Better knowing how to make one, than just knowing how to use one.


And the negative news about West Philippines sea? I think these market traders are just threading stories and hitting where it would "hurt", so scared traders will unload their stocks and they would wait to initiate an ambush buy. The oil price might move exactly as Macquarie forecasted, and these market traders won't miss every chance they can make to make the trades favorable to them. So why I'm planning to sell? I don't believe there would be a war in the west philippines. but I won't like myself getting left out when everyone is selling. OIL stocks has good fundamentals especially with the recent events. but sitting down and wait for it to recover is bad. My plan is to re-enter when it is near the bottom.


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