Wednesday, April 15, 2009

DLL file "Add reference" Error in Visual Studio 2008

Error adding dll file to visual studio 2008 as reference Error 1: While the trying to add JSIM.dll file to the project it gave an error:

A reference to 'D:\filepath\filename.dll' could not be added

The verdict was that the .dll file was missing the .pdb file (my assumption) or since the dll was stored on the server and downloaded as a text file the server probably added a mime filetype descriptor in the dll file to a .txt file (As when it was downloaded of the server it, for some funny reason wanted to store itself as .dll.txt file and so it was basically corrupt.

So Scott had to download a fresh new copies of .Dll files and the accompying files.

Are IFrames better than using <div> tags and dhtml or AJAX on it.

After the whole discussion, on is IFRAME better or the DIV it could be easily said that both of them do pretty much the work what other other can do. The iframes could buy ease of useage without delving into the complexity of dealing with AJAX but on the other hand we would run into the problem of dealing with the javascript for the Iframes. It would be best if some one could come out with a middle solution that delt with the complexities of both.

A student at University of South Alabama (School of Computer Information Sciences) did his graduate project on reducing this complexity down to something as simple as adding one line of code to populate the iFrame and close it using the same instance of the object. But this solution is only functional with Visual Studio (Microsoft Technology only).

A Good Research Topic would be to make that thing more portable to work with java or any other technology, in respect to my conversation with the guy that developed it "Scott Lusk", he mentioned to me about the microsofts technology named "web resources".

Tuesday, April 14, 2009

Interview questions to prepare for

You thought the interview went great, but why didn't you get hired? Interviewing can be a tricky thing when you're not fully prepared. Here are 9 interviewing questions to prepare for.



"Tell me about yourself
Make a short, organized statement of your education and professional achievements and professional goals. Then, briefly describe your qualifications for the job and the contributions you could make to the organization.

Why do you want to work here?
Few questions are more important than these, so it is important to answer them clearly and with enthusiasm. Show the interviewer your interest in the company. Share what you learned about the job, the company and industry through your own research. Talk about how your professional skills will benefit the company. Money is never a good answer. Remember that during the interview, your goal is to demonstrate why you are an asset to the company, not why you need a job

Why did you leave/leaving your last job?
The interviewer may want to know if you had any problems on your last job. If you did not have any problems, simply give a reason, such as: the company relocated, the company went out of business, you were laid off, you want a position that is better suited to your skills, etc. If you did have problems with your past employer, be honest. Show that you can accept responsibility, regardless of who is at fault, and learn from the past. Avoid too much detail and avoid negative comments about your last employer. Demonstrate that you are not a person who is caught up in the past or one who holds grudges.

What are your best skills?
If you have sufficiently researched the organization, you should be able to imagine what skills the company values. List them, then give examples of where and how you have demonstrated these skills.

What is your major weakness?
Be positive and up-front about areas that you would like to improve. All of us have some sort of weakness. Briefly state an area where you are striving to improve, and what actions you have been taking to improve in that particular area. Demonstrating that you are aware of some areas that need improvement and are taking action to improve in them, shows that you are aware of your abilities. Avoid the standard answer, “I work too much.” It is either a lie in (in which case you have lost all credibility) or it is the truth (in which case improving upon the weakness means you will work less).

Do you prefer to work by yourself or with others?
The ideal answer is one of flexibility. However, be honest. Provide an answer, then follow-up the answer with brief descriptions of times you have worked successfully both alone and in a group.

What are your career goals? Or, what are your future plans?
The employer wants to know if your future plans match the company’s future plans. Let the employer know that you are ambitious enough to plan ahead. Relate your answer to the company and position, not that you want to open a restaurant or relocate in the future. Talk about your desire to learn more, improve your skills, contribute to the company and create a rewarding career.

What are your hobbies? Or, do you play any sports?
The employer may be looking for evidence of your job skills outside of your professional life. For example, hobbies such as bridge or chess demonstrate analytical skills. Reading, music and painting are creative hobbies. Sports show determination, teamwork, determination, stamina and competitiveness.

What salary are you expecting?
You don’t want to answer this question directly. Instead, deflect the question back to the employer by saying something like: “I am open on salary; what were you planning on paying for the right candidate?” or “I want to earn as much as I am qualified to earn. What would you offer someone with my skills?" or “I am currently making $_______ and would like to earn more than I have in my last position. What kind of pay were you thinking for this position?”"


Ref: From: Ashley Ellis April 14, 2009
http://www.ashleyellis.com/career-resources/interview-questions-to-prepare-for.html

Monday, April 13, 2009

Common Error with IIS7 "the 500 error message"

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

I was trying to invoke webservices for creating a web reference in visual studio project.

After publishing the SOA, I found out when I try to do a webreference through localhost (not localhost:someport) and call its giving an error following is the detailed error.




HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related
configuration data for the page is invalid.


Detailed Error InformationModule
IIS Web CoreNotificationBeginRequestHandlerNot yet determined
Error Code0x80070021
Config ErrorThis configuration section cannot be used at this path.
This happens when the section is locked at a parent level.
Locking is either by default (overrideModeDefault="Deny"),
or set explicitly by a location tag with overrideMode="Deny"
or the legacy allowOverride="false".
Config File
\\?\C:\inetpub\wwwroot\Exercise1BusinessFacade\web.config

Requested URLhttp://localhost:80/Exercise1BusinessFacade/wsUser.asmxPhysical PathC:\inetpub\wwwroot\Exercise1BusinessFacade\wsUser.asmxLogon MethodNot yet determinedLogon UserNot yet determined


Config Source
104: </modules>
105: <handlers>
106: <remove name="WebServiceHandlerFactory-Integrated">

The way it was solved are mentioned below

  1. browse to inetpub directory in windows explorer and right click on the directory name and go to properties---> security---> add ---> find user with name "IUSR_???" add that and giive it read, write and execute permissions to that directory
  2. go to %windir%\system32\inetsrv\config directory and look for "applicationHost.config" file. You have to allow overrides for "handlers" in the config file .
    Note: you have to start notepad with administrative rights to edit this config file.
  3. Finally if you have windows vista installed and that user control lock thing is enabled. It will cause the visual studio not to access the localhost webservice from within. So you have to go to start type "visual studio 2008" and in the search list above right click and start as an administrator.

Refer : http://support.microsoft.com/kb/942055/

Brain Dead today but have to finish SOA Assignment before the class

Learn't how to turn of Friendly error messages under Internet Explorer 7.0

" To disable this and see the real error coming from the server, you need to go to “Tools > Internet Options”, choose the Advanced tab, and clear the “Show friendly HTTP error messages” checkbox. Then, close the browser, open it again, and re-request the page."
Ref:- <http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx>



And how to enable detailed error messages for remote clients

First, if your error is an ASP.NET exception (you can tell if it says “Runtime Error” and has the framework version), please be aware that ASP.NET overrides the IIS custom error mechanism with its own implementation of custom errors, so you should turn the ASP.NET custom errors off to see detailed ASP.NET exceptions. You DO NOT have to configure IIS7 custom errors for ASP.NET exceptions (it would be silly to have to do it in two places). To turn off ASP.NET custom errors, place the following in your web.config:

If the error is not an ASP.NET error, turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”.

Ref:- scroll to the middle of the page<http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx>

Wednesday, April 8, 2009

Move "My Documents" folder to another drive or place then default

I was messing around with the Documents folder in windows explorer and messed up the registry where it would not work but the registry hack worked for me. So for all you out there this is good just use the registry hack if you have messed up by moving back and forth and if it stops working.

Go and change that, It would reflect that on the windows explorer %userprofile%

A lot of My Documents folder location changing instruction requires modification of registry key at the following branch:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\



Reference: April 09 2009
http://www.mydigitallife.info/2007/11/25/change-my-documents-folder-default-location-path-in-xp-and-vista/comment-page-1/#comment-569846

Wednesday, April 1, 2009

Is it worth the wait for any feature on visual studio?




The class discussion about "wait for the feature" untill microsoft officially releases a product feature (Drag and drop for AJAX).




Dr.Pardue showed his love for only sticking with and using Microsoft's "officially released" features.




Corporate companies have their own corporate cultures in terms of the best practises to be used, it is confusing when one company has outlook 'A' when it comes to best practise where as a different company may have outlook 'B' to the same particular problem. The best practise is decided based on the fact if the company likes to be on the edge in terms of technology. Where as a company developing a business Application would cohear to more safe and tested best practises.




Presenter: Informed us about using DOJO the javascript toolkit, with the application development under ASP.net




Went over the AJAX Toolkit (how to install it videos) showed us the samples .




Scalability?







AJAX: Clay Davidson article (doc)
What is LINQ? (A new reserch topic)

Draft version of CSS3. Only mozilla implements it.

How AJAX is ajax?

Ajax very well known as (Asynchronous JavaScript and XML), has made itself to the top of the buzz word list. When you think of the the concept of AJAX it has been implemented using different technologies in the past. Microsoft started that post back technology and named it as ActiveX control.

Most of the times when ever you see the fancy script on a webpage doing funky things. I tell my self oh.. that must be AJAX magic. But to my wonder most of those funky doing scripts I have come accross were either mainly doing javascripts or were combination of Asynchronous Javascripts.

If I was to guess from my browsing experience, XML is barely 20% of the times used where ever the word AJAX is used.

Monday, March 30, 2009

CTS presentation on AJAX

Asynchronous Java Script And XML


1. Asynchronous
2. Javasript
3. XML (Not in literal sense) (Could be tags)




Why? AJAX??


- Lots of data running back and forth.
- Instant feedback for actions from database.
- Not asking server to get the whole page.
Example: some calculation that took long time on a given page and you need to refresh a small component on a page
It would refresh and goes over the same query for that small piece of code.




Microsoft solution inplace of AJAX was ActiveX control
-======-
ASP.NET Examples below.




Asyncronous
- Communication - XML Http Request


Javascript
- Client side processing
- DHTML
Change all the properties of HTML on the fly.


XML
- Data Exchange format.




Script Manager
- Brings the thousands of lines of code to the programming, Its like a container
- In code add where ever but always should be before Update Panel.


Update Panel
- To Ajaxify the exisiting buttons tables or other controls
- After adding
<?xml:namespace prefix = asp /><asp:updatepanel id="panel1update" runat="server"> </asp:updatepanel>

-Add the
 <contenttemplate> </contenttemplate>
tag right after update panel


Question: What if there was object that was outside the scope of <scriptmanager>because of the asthetic reasons?</scriptmanager>
A: Use
<trigger> </trigger>
tag
<triggers></triggers>

 <asp:asyncpostbacktrigger controlid="Button1"></asp:asyncpostbacktrigger>

// CAN HAVE AS MANY AS NEED BE
 



Update Progress
-


Timer
- Shows the time used.








DEMONSTRATION
---------------------------
Client side
============





var xmlHttp;


function PrepareRequest()
{
Request("PrimativeAjax.aspx?data=a");
}


funtion Request(url)
{
xmlHtp = null;
if(window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
isIE = true;
return new ActiveXObject("Microsoft.XMLHTTP");
}
}




function doCompletion() {
if (completeField.value == "") {
clearTable();
} else {
var url = "autocomplete?action=complete&id=" +
escape(completeField.value);
var req = initRequest();
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status == 200) {
parseMessages(req.responseXML);
} else if (req.status == 204){
clearTable();
}
}
};
req.open("GET", url, true);
req.send(null);
}
}
fucntion ReloadPage(data){
if(data != null)
{
document.getElementById("textbox1").innerText = data;
}








==========
Server Side
==========
if(
Response.Write(Time.Now().ToString());
httpContext.Current.ApplicationInstance.Complete(); // this is for sending the 200 code to the requesting client.

Thursday, March 26, 2009

Color Scheme



#####  Color Palette by Color Scheme Generator #####  Palette URL: http://colorschemedesigner.com/#2K62nsOsOK-K-   *** Primary Color:     var. 1 = #38C113 = rgb( 56,193, 19)    var. 2 = #437935 = rgb( 67,121, 53)    var. 3 = #155C02 = rgb( 21, 92,  2)    var. 4 = #85F069 = rgb(133,240,105)    var. 5 = #B8F0A9 = rgb(184,240,169)  *** Secondary Color A:     var. 1 = #1C4A98 = rgb( 28, 74,152)    var. 2 = #2F415F = rgb( 47, 65, 95)    var. 3 = #031D48 = rgb(  3, 29, 72)    var. 4 = #719CE5 = rgb(113,156,229)    var. 5 = #A9BFE5 = rgb(169,191,229)  *** Secondary Color B:     var. 1 = #E6DE17 = rgb(230,222, 23)    var. 2 = #8F8C3F = rgb(143,140, 63)    var. 3 = #6D6903 = rgb(109,105,  3)    var. 4 = #F9F36D = rgb(249,243,109)    var. 5 = #F9F6B0 = rgb(249,246,176)  *** Complementary Color:     var. 1 = #DC162D = rgb(220, 22, 45)    var. 2 = #8A3C45 = rgb(138, 60, 69)    var. 3 = #69030F = rgb(105,  3, 15)    var. 4 = #F66C7C = rgb(246,108,124)    var. 5 = #F6AEB7 = rgb(246,174,183)   #####  Generated by Color Scheme Designer © Petr Stanicek 2002-2009

CSS tags for a:link a:hover

Found Solution 
a:link:hover, a:visited:hover {text-decoration: underline; color: red; background: yellow}


reference

Tuesday, March 24, 2009

Almost Lost the previous post, Thanks to the auto save feature (draft) in the blogger.com website

This new HP DV9207us laptop craps out on me everytime I am about to finishing up something valuable. 

After the lappy craped out on me, I had 4 mins before the class and had to rush... so on my way was thinking about the google mails auto save feature, and hoping that google integrated that to this blogger website.

Really this feature is a life saver and I rejoiced seeing my typed blog post was saved in as a drafts under posts

rANdOM ThOUgHTS

Just finished watching interview of the whole house crew... and the question about "would you go to medical school?", and their replies were either "I could last their for a week" , "I could be a lawn doctor" makes me wonder... are we all really getting stupid.. yes, i say we cause I feel no different when it comes to thinking "Its too much for me to do or learn"...

After years I realize that a blog might help me share my ideas and elaborate on my thought process and think more clearly... and I Come back to this blog....

Ok, so getting back to the thought process... Is it genetically part of all human beings to set limits for themselves and start saying "I can..." and "I can't..." do this... or its the fear of learning new things and failing... or we are just complaisant enough with what we know, and not learn new things and think would get us around, without them.

I have realized many times, when things start falling apart, my thought process automatically weakens and starts falling apart too and this happens in a growing progression... (It is more in terms that my mind says "I can't" instead of "I can") the only way out for me, is to either completely focus on that thought fight with it or find some digression far away from that thought. When starting to fall apart... the psychological response: if i decide to focus and stick with the thought, then it is to go about taking a nap and relax my body. while the mind has all the freedom to solve the complexities of mind (formal thougth: think only about the problems) and not get distracted by the interrupts raised by other organ system.