Saturday 25 June 2011

1st April - Fools' day or how my wife sent me to jail

Today is 25th June 2010. I thought that my problems with law are finished but not...
Like in some stories - to be continued....
I am writing this article as a message to my son, so he will be able read it in the future.
I haven't seen him for almost 3 months already and very miss him. Here is what happened to me (there is no fun in this story):

Pre-history:

I mentioned that My wife made abortion 3 years ago, so I hit here and was sent to jail (I admit that was guilty that time).
http://dkochnev.blogspot.com/2011/06/ready-for-jail-2008-my-true-story-in.html

In the result, I got probation for 1.5 year and criminal record, but we decided continue live together. The main reason why I stayed with her is my son. I didn't want him live without father. I was focused on our family and was happy to see him growing as a happy kid.
As for my wife, I think, my wife started make plan how to destroy me. I asked here once - "Would you leave me if you would have money in a pocket?" - The answer was "yes".
I am paying big price now and probably will be send by my wife to jail again, but I am happy that I spent last 3 years close to my son. I was giving him the best…

Here it is beginning of story.....
After abortion my wife decided finish RCC Institute "Interior Designer" course - 3 years to get diploma (It is not promotion :-) ).
She really has a talent to draw and has taste in colors, so I was happy for her.
There was only one problem - She started spending more and more time on her education and stopped care about kid at all. Every time I asked her have a walk or go somewhere like cinema - she declined - "She always was busy".
For the first year of her education she took student loan and for next one I paid about 1300CAD per month. I thought that it is time to buy house and move out from apartment and nobody would give mortgage if she would have loan.

June 2010  - decision to buy house
My wife started complain about space in apartment and we started think about buying house. I sold some property in Russia to have enough money for that
(I have a feeling that it was beginning of her plan how to destroy me). In any way, I found very beautiful house, which could be perfectly fit for a big family - it was my dream.
I was a little bit scary that I wouldn't have free time to maintain house and do the same things as before.
I was responsible for everything - Make money, cook breakfast and dinner, spend time with son (I loved it), get my wife to her education, get my son to Montessori school and pick them up both after work.

September 2010 - new house
We moved in to house on September 2010 and I found that she totally changed her behaviour.
It became even worse than before. When I made party and invited about 20 people to celebrate new house she didn't even helped me to prepare anything- she said - you invited you do it.

October - my son's birthday. Usually I made such parties outside, but this year we bought house and I decided invite everybody to us. My wife didn't even participate in it. She didn't care about gift for son, loot bags and food. I was doing it on my own. I was very upset about our family situation.
She didn't even sleep in the same bed with me. I am not even talking about sex.
I started drink alcohol more and more. I am not alcoholic but it helped me some times.
I drank usually when my son was already in a bed. No matter what, but I always was on move - spent time with kid, delivered both to institute and school, played with son, helped him to do homework, cooked dinner and breakfast + house stuff and personal hobbies, such as woodworking ....
Every time I went to my friends, so my son could play with their kids, my wife didn't want to go.
I covered my wife for a while - I didn't want my friends know about our family situation.
On the same month she asked me to be guarantor for her sister to make student permit at Seneca College and I agreed. Actually, I was happy to help relatives but I was surprised to see my wife in bad mood once I signed all papers.
She started ignore me again.

December 2010 - christmas
We went on Christmas to Mont-Tremblant. She had an accident while skiing and broke her bone.
I was helping her for about 2 weeks. It was hard time for me too.
Everybody was on vacation and I couldn't leave kid with my friends.
I went from Toronto to that village hospital and back twice (it is about 700km one-way) and kid was with me. I slept those days for 2-3 hours a day.

January 2011 - her sister came to Canada. I was happy to see her. She spent more time with me and my son than my wife. Her coming added extra load for me because I had to drive my son, wife and her sister to education and pick them up. I was enjoying my wife's sister presence in any way.

February 2011 -
I started experience financial problems. At the end of month was my birthday.
And guess what - She didn't even celebrate me. My car was broken that day too
(transmission), so I had to spent ~ 5000CAD to fix it.
I thought my wife would support me, but she came home and went sleep - no word.
It was my worse birthday ever. After that I decided - stop doing that. It was it.
I made decision do not leave with her anymore it was just time matter.

March 2011 -
I couldn't handle our relations anymore and suggested divorce. I offered live together for a while, so she can find work and will be able to pay for her education and future bills.
At least, I suggested reasonable offer. She blew up and she started scream at me and beat me.
She started pack her stuff and kid’s stuff too. She said that she would take kid and I would never see him again.
I was very quiet that night. My son and I went to closest park while she was packing, so my son couldn't see it. Her sister helped to stop her that night. On the next day I found that she took all her and my son's documents from the house and hide it somewhere else.
Beginning - 1st time in jail (after 3 years):

1st April 2011 - fools' day - my arrest day:
My wife was not home for 2 days - Thursday (March 31) and Friday (April 1).
She didn't even tell me where she went. Her sister told me that she went to cottage with friends.
I was angry at her because she didn't care about kid at all. My son was even crying at school about mom's absense - teacher called me couple times, so I had to picked him up earlier.
I received call from school on Friday about 2:30 from afterschool program that somebody picked my son.
It scared me, because I knew that wife is not in the city. My tries to reach my wife and her sister by phone were unsuccessful.
I finally reached her sister and she told me that my wife came from cottage and picked up son earlier.
I went home and found my wife in a family room and asked to talk with me privately - she declined.
I understand now why - she recorded our talk and gave it to police - She was preparing for that and had strong plan.
ok...
I started talk with her about my son's documents. In my plans was to open new bank account on my Son's name. She said that would scan it and send it to me by mail but wouldn't give me originals. Finally, I asked her about where she was all these days and her answer was - "it is not your business". I replied "WTF it is not my business?". I didn't hit or push her. She started cry so loud, so unnormal. I didn't know that time that she was recording everything.
In any way I started speak loudly with her. She started pack her stuff again, including my son's toys - the same story as 2 weeks ago. I was so upset about it.
I decided leave house by myself. I took some documents, and put it in a car. I left house but found that I forgot personal laptop. I went back and took it. I talked with my son a little bit and ...
here it is - she called police.
Police officer asked me if I hit her or not - I said not. He told me that If she says that I hit her I will be arrested.
Guess what??? She said that I pushed her/hit her, so I was arrested!!!!!
It was Friday when I was arrested. I spent 4 days in a jail and i am on bail now.
My bail conditions are:
1) I have to live at my surety’s house
2) Cannot communicate with my wife, her relatives, including my son (this is the worst part)
3) I cannot go to anywhere without my surety, except work.


I am really disappointed in Canadian law system, but this is not as important as my son.
Police officer said that son was in a house and I cannot see him till final hearing - only via family court order.
I haven't seen him for almost 3 months and who knows how many days or months or even years I will not see him.
My wife set me up and she is still playing in that game - she wants send me to jail for a long time.
I don't really know what is on her mind but she wants get everything from me - even my son.
I am really scary for his future because she never worked since we were married - 10 years.
I don't know how she is planning live here in Canada but it is pretty clear - you cannot live here without money and she is trying get it. I made an offer to her once to sell the house by good price and put all money to our son's trust account in a bank. I also promised support and pay her bills but she declined it - she said "I need it now and everything".

May 2011-
I opened bank account for my son and transferred 4000CAD to it and will do it on regular basis. I decided that my son should have money when he will be 16 to be able for education, car, and house.
I tried many times to hire family lawyer to get permission to see my son but nobody wanted take my case. They were saying "Just wait for final hearing on June 7th".
I went to family court by myself and asked counsel what I can do. He told me that I have to fill application but hearing at family court will be in 2 months only, so I didn't do it :-(

2nd June 2011 - bus
I was going to my work from surety's house and got in bus 60 (steels east). I was shocked and happy to see my wife's sister. I had a hope that she would tell me something about son. I slapped her shoulder friendly and said “Hi, how are you doing?”. She ignored me, I became very upset and went to back raw seat and didn't talk with her anymore.

7th June 2011 - My court hearing.
It was moved to July 28th :-( I was very, very upset. I thought that would be better I fill that application at family court.

9th June 2011 - I came from work to my surety house, took a shower and was going to sleep, but ... knock…knock.
I opened the door and saw police officer. He told me that I am under arrest because broke bail conditions. He said that I was on the same bus with my wife's sister. My wife simple used it against me. Police is charging me for assault against her sister now.
It is stupid, isn't it? I blame that day for accidently being in that bus. I stayed in a police station for that night and was delivered to New Market court. I didn't even want hire lawyer.
I was very depressed. In any way - my friends and lawyer (thanks for her work) bailed me out.
After 9th June 2011:
I stopped pay for the house. I very tired of it. I offered before many times to my wife sell the house and transfer all money to my son's account. I also guaranteed that I would pay for her current education + apartment rent. She declined all my suggestions, so I am giving up. I closed bank account. I will write another article about how I lost the house.

My wife sent me message with an offer to meet at park close to the house, so my son and me could meet each other. I was happy and it scared me at the same time. I couldn't trust her anymore - she sent me to jail twice for nothing. I started ask my friends what to do. I got many advices and my final decision was - no. It was hardest decision I ever made. I really wanted to see my son after 3 months of being nowhere. Actually, my wife was selling kid to me - She started blackmail me.

Her messages contained clear requests:
1) I need you to sell the house and give all money to me
2) If you not agree to do it I will use everything against you
3) You will not see son till his age of 17
She also sent me message that she was recording me since October 2010!!!!!! I couldn’t believe in it. She was recording me at the time when we were going to Mont-Tremblant for skiing. She was probably recording me when I was cleaning staff after her when she couldn't walk because of her broken bone -.... fck.... what a viper.

June 24th - I had a meeting with my lawyer.
I was listening all recordings, she made. From the recordings I realized that her sister knew about it, so she was part of this big plan send me to jail. I could go back to work that day – I was thinking about everything.
P.S.
I spent for the lawyer services at this moment about 7000CAD. I would better put it to my son's bank account. I am happy that still have my work - it helps me to get out of reality. I still live with my sureties. I very, very miss my son. I love him and worrying about his future. I guarantee that his life would be perfect if he would stay with me. I am keeping pay for his school and summer camp and hope to see him in nearest future.
At this momement I tried hire ~10 family lawyers but they don't want take my case because it is related with criminal and it is not related with property. One lawyer still feeding me with promises but I am giving up. I will create article about this matter as well.

To be continued.....

Tuesday 21 June 2011

WCF Framework 4.0 - Monitoring Service Performance by using Performance Counters

Let's say you created WCF service, decided host it in IIS and want monitor service performance. One of the options,which you can use without apply extra work is to use built-in framework functionality. I will be focused on Microsoft Framework 4.0 in this article. There is bunch of performance counters to monitor service calls but in this sample I will use number of "calls" and "calls duration" only.

Create project

I created simple WCF service project, which contains CustomerService.svc and OrderManagement.svc services, which can be used in E-Commerce solution.

CustomerService.svc service contains following operations:
GetCustomerProfile - suppose to return customer profile from back-end systems
CustomerExists - check if such customer exists

OrderManagementService.svc service contains just one operation:
GetOrders  - returns list of customer orders from back-end system

I will not be focused on implementation of these services. I created it just for sample purpose. I made random response delay in every service call. In GetCustomerProfile operation I set max response time to 2 seconds and in GetOrders operation I set max response time to 5 seconds.

I also created client, which is console application and makes all calls via data access layer. Console application is configurable and allows enter number of calls to WCF services.

here is sample of 2 seconds delay:

 int ms = new System.Random().Next(2000);
 System.Threading.Thread.Sleep(ms);

Here is my solution structure in VS:



Work with WCF performance counters

You have 3 options to monitor WCF calls in this project:
  • Service level
  • Endpoint level
  • Operation Level
you will find more details in this MSDN article:
http://msdn.microsoft.com/en-us/library/ms735098.aspx

Here are detailed steps for current project:

1) Enable WCF performance counters

I want to be able monitor calls on operation level, such as GetCustomerProfile. In this case I have to turn on monitoring in WCF service project by adding following entry in web.config in <system.serviceModel>:
  here it is
    <diagnostics performanceCounters="All">
    </diagnostics>
2) run perfmon tool, which is part of operation system from the run command or by running it via "Control Panel->Administrative Tools->Performance Monitor"

3) Add performance counter


You have 2 options here. If you want see real-time performance counter value you should select "Performance Monitor". If you want create baseline and keep history of performance counter values in time, you should select "Data Collector Sets->User Defined".
In most cases I prefer second option - once you added performance counters to data set collector set, you don't loose it anymore. You can even export data collection sets from one environment to another.
In this sample I will use first option  - "Performance Monitor".


4) Select Perfomance counters at service level

I want monitor total calls to CustomerProfileService.svc service - it will be sum of calls to GetCustomerProfile and CustomerExists operations. In this case I have to select "ServiceModelService 4.0.0.0". 4.0.0.0 is because I use Framework 4.0. But when you select it you will probably see no performance counters like shown below:



The solution is to register performance counters for your service. You can do it by making 1st call to your service or by running "WCF Test Client" right from Visual Studio (it is what I want to do).
4a) Select your WCF Service project as startup project and select CustomerProfileService.svc as startup file.


Press F5 (run in debug mode) you should see following screen:


Close WCF test client if you see screen above and go to the next step. If you have any exceptions, check this article -  It can help you:
Microsoft Framework 4.0 WCF Service and IIS 7.5 Application Pool permissions


4b) Open performance monitor tool. Repeat steps to add performance counter at service level. You should see now that performance couter for CustomerProfileService has been registered:


The pattern for the service name will be
ServiceName@ServiceBaseAddress

Select "Calls" and "Calls Duration" and click "Add" and click "OK" buttons.

If you want see performance counters for the "OrderManagementService.svc" repeat step 4a) but do it for OrderManagementService.svc.

5) Select performance counters at operation level
To understand what is the bottleneck of the created service you should monitor service activity at operation level. For example, if I want check response time for the GetCustomerProfile I have to use "ServiceModelOperation 4.0.0.0" performance counters category and select operation by following pattern:
(ServiceName).(ContractName).(OperationName)@(first endpoint listener address)



6) Monitor Performance counters
6a) I run test console application to hit wcf services:
I entered 100000 total hits to both svc services.

I am not listing source code for the console application, because I am focusing on performance monitor now.

6b) Switch to Performance Monitor Tool
You should see similar picture as me (shown below). You can select and deselect performance counters from graph by clicking on checkboxes. The most important function here is scale. It allows scale counter values in graph. You should select performance counter my right mouse click and select "Scale Selected Counters" in popup menu.


Values of the performance counters will be changed in time, so from time to time you will have to run scale to adjust graph.
To check number of calls at service level you should select Instance by pattern, which I describe in section 4b.



To check call duration for "GetCustomerProfile" you should select Instance by pattern as I described in section 5. Value for the duration is set in milliseconds. As you can see above, last call duration was 1.2 seconds:




6) Select performance counters at endpoint level
I mentioned at the beginning that will be focused at "calls" and "call duration" performance counters only. Endpoint performance counters enable you to look at data reflecting how an endpoint is accepting messages. They can be found under the ServiceModelEndpoint 4.0.0.0 performance object when viewing using the Performance Monitor. The instances are named using the following pattern:

(ServiceName).(ContractName)@(endpoint listener address)

Following picture shows message oriented performance counters and instance name for my CustomerProfileService:


Have good luck with finding bottlenecks in your services.

My computer Configuration:
CPU: Intel i5
Memory: 6Gb
OS: Windows 7 32 bit
Development Tool: Visual Studio 2010 Ultimate
IIS version: 7.5

Wednesday 15 June 2011

Graffiti symbols in 3D MAX

I am spending a lot of time in traveling by bus to work and from work.
I use my laptop to learn how to work with 3D studio Max.


I wrote article recently about Graffiti on streets of Toronto.
It became interesting research for me. I asked myself - "Can I create graffiti? Is there any rules to create graffiti?". First of all, I don't have any art background so I found some tutors in internet about how to create graffiti letters:
http://www.ehow.com/video_4991150_write-graffiti-letters.html

I liked author statement that there are no restrictions and rules to do it - just do it.
Your creativity will show you results. It is pretty same as in software development: you can achieve result by many ways.

I took a pen, piece of paper and started create some weird symbols. Here is what I got - my son would do it better :-)


I got an idea to move it to 3D Studio Max and create it as 3d objects.




next Idea was to add some rain and camera moving and here is final result:




Here is another abstraction, which I created in 3 minutes. I call it "Glasses":


Obviously, I am just beginner in it but I will try improve my skills.

Monday 13 June 2011

Ready for the Jail? 2008 - My true story in Toronto.

Hi,
I thought many times about publish this story or not and decided yes.

I came to Canada in 2005 together with my wife. She bacame pregnant and my son was born in October of the 2005.
Actually, she didn't want that kid at all, but I asked here to keep it. I very love kids. She was depressed bacause she had plans to do something in this country too (or may be kick me out as far as possible). In Russia she finished economic academy as an accountant.
She didn't want to be an accountant - here mom sent here there because it was good profession of money.
In Canada my wife didn't know what to do at all. I asked here many times what she would like to do but never got answer.
In 2.5 years my wife became pregnant again but at this time she decided do not keep baby and she made abortion.
She notified me about pregnancy and I was happy but on next day she made abortion.
1) Beginning - Friday
I was suppressed that day. My friends called me and said that she made such decision.
I drinked 3 glasses of whisky. She came from hospital and I couldn't even look at here.
My wife's explanation was - "I hate kids and I don't want sit home another 2 years. I want start work".
Today is May 2011 and she is still not working...... The unborned kid would be 3 years old already.
I started scream at here and hit here - "You should fill exactly the same as unborn kid" (I still loved my wife at that time but could beleive she did abortion. I admit that made terrible thing, but I think she made terrible thing too).
I told here that I want leave here alone and leave country with my kid (I wouldn't do it in anyway - it was just alcohol)
I was screaming for a while while she was in a bedroom. She threw out note "help" from window, so superintendent picked it up and called police. Police arrested me. That day I didn't even want live - I thought that she killed baby.

2) In a police station - Friday night
I was delivered to police station. These guys checked my personal stuff and sent me to cell.
I couldn't sleep that night because it was very cold - metal bench. I had a chance to talk with duty
counsel and he said that I would be released on morning (bullshit).
3) First time court hearing - Saturday morning
here is list of all courts in Toronto:
http://www.attorneygeneral.jus.gov.on.ca/english/courts/Court_Addresses/

Next morning I was sent to another place to get my finger prints (Yes! I am in Canadian history now.) by one of those cars, which you can probably see at streets with label "Court services". Every time I see it I feel looks like I am inside.


Car has 2 sides for people loading. Every side has one long metal bench. Every arrested person bound to another person by metal handcuffs.
After my fingerprints and picture was taken (I would pay 20 bucks to get that picture now), I was delivered to court - downtown of Toronto:
60 Queen St. W. Old City Hall
Toronto ON M5H 2M4



Beautiful building from outside - isn't it?

but in a cage..... It was pretty busy - about 20 people (men only). It suppose to be another cell with women but I didn't see it.
We got sandwich around 12.
It was saturday and court worked till 1 pm. Of course they couldn't process such amount of people.
Some people started say - "I would wish to be in a jail now rather than be here". I couldn't understand why they were saying that, but I do now (explanations later).
so... court finished work at 1pm and didn't even go to court. We got information that we would be send to jail!!!!
We were waiting till 4pm and they started pack us by 8 people in chain to cars (about 16 people per car).

4) In a jail - Saturday night
I don't remember what jail it was but looks like "Lindsay Super Jail". we were placed in waiting cells, so they started register us, make vaccination and gave us jail clothers. Every person had to pass metal detector, like in an airport.
Finally, we were delivered to block range. Every block has about 5 ranges.
Once you get to range you have to read range rules. and hit a wall if you understand it.



The timing was - 2 hours at range and 2 hours in a cell. Eat only in cell - 3 times a day. light turns off after 10pm (it is what I remember - correct me if I am wrong).
Next court hearing suppose to be on Monday, so I staid in a jail 2 1.5 days before go to court again.

5) Second time court hearing - Monday morning
I woke up at 6AM and backward process started - change clothers, back to a car. ~1 hour to get court. This time I was delivered to another court:
1000 Finch Ave. West
Toronto ON M3J 2V5


That day I saw my wife and friends. My wife told me later that she just wanted to take me out from her and she didn't want police arrest me.
This "simple" word broke my life. My wife tried get written statement from the police but it works one-way only. Once police get written statement, goverment launch process against you and you have only one option - protect yourself.
The system works the way so it forces you hire lawyer. Awesome - you pay taxes and it supports court system, together with jails.
In any way - everything was new for me and my friends and they hired Russian lawyer.
You know - those kind of lawyers, which offer they services right at court, by walking between your relatives/friends and offering them lawyer services.
I would never hire Russian lawyer again in Canada (Just think about - Canadian lawyer in China court :-) ). That day he asked court get some papers about me and promised me that I would be released on next day.
So... I went back to jail that day. As for lawyer - he took 1300CAD for bail me out from a jail.

6) Third time court hearing - Tuesday morning
Again - woke up at 6AM and was delivered to court around 8AM. That day first court hearing was mine ~9AM and I was happy to hear it but my lawyer was late and ....
I was sent back to jail.:-)
7) Fourth time court hearing - Wednesday morning
the same as before but that day my hearing was at 11AM. Finally... I was released on following conditions:
a) do not go back home
b) I had to live at my friend's house
c) I couldn't drink alcohol (because alcohol was involved in that case)
d) I had 2 sureties
My next hearing suppose to be in 1 month, so I had a choice to hire another lawyer but I didn't do it - my mistake.

8) Fith time court hearing - in one month
I paid ~3500CAD for the whole process, so I didn't have to be there. He got final disclosure ans said that I have big problems - up to deportation.

8) Six time court hearing - in ~2 months (I don't remember exactly)
It was Finch court again, so I came earlier and found my lawyer in a court waiting area. Lawyer got crown position and forced me to plaid guilty.
It was only one choice if I wanted go back to family. I had another choice - say that I am not guilty and go for a trial - up to 9 months.
I wanted be back and selected - guilty. No matter what but I felt guilty in my soul and I said sorry to my wife many times.
Court said that if I would go for a trial I would be arrested and would be sent to jail because one of my sureties decided do not be my surety at all
(I still don't know if it was part of the court game or not - I asked my sureties but they said no - they didn't do it).

What I got:
a) Criminal record
b) 1.5 years of probation
c) I had to pass "Angree Management course"
d) I had to pass another course, related with family
I would recommend to pass it to any family - especially before marriage to better understand each other.

For the probation period I had to go once a month to say "Hi" to probation officer + 4 times Our family was visited by Child society person.
What advices I would give:
1) Keep landed phone number of your friend (who can bail you out from jail) with you being arrested because you cannot call from jail to cell phones
2) If you don't have lawer and you first time at court - ask for the Bail program, so you can be released on some conditions
3) If wife called police first time - divorce - she will do it again. I got this advice from other people and I didn't do it first time, so I am divorcing with wife in any way (another long story coming ....).
4) If you are not allowed to contact your spouse, never use cell phones (they are tracked). Internet services like skype and web camera will help you!!!
5) If you not allowed to come back to your house - do not come back. Do not make any risk to be caught. Be patient.
6) Always keep lawyer phone number with you if you think you are in trouble.

I would say "to be continued" but "it is being continuing": My wife sent me to jail 2 more times and trying get everything from me...... I will write about it......... I cannot beleive that it is happening ...... I haven't seen my son for 2 months already and law .... protecting here. I will try hire another family lawyer to get permit to see my son.

Saturday 11 June 2011

Microsoft Framework 4.0 WCF Service and IIS 7.5 Application Pool permissions

Hi,
Here is an article about how you can fix tonns of problems with IIS 7.5 and app pool permissions.
You probbaly created already WCF service in Visual Studio 2010, installed on Vindown 7, with intalled IIS 7.5. New version of IIS has ne security model and it cann affect your testing and if you don't know what to do, you can spend hours to find the problem.

Lets say you created new WCF project in Visual Studio 2010, set it as sturtup project and set startup svc file as startup page. When you run project in debug mode Visual Studio runs "Microsoft WCF test client". So far so good. you can see your wcf service definition in wcf test client:


you can find that it uses specific port. It is because by default Visual Studio uses "Visual Studio Development Server". It some cases it is fine to use development server, but in most cases development environment should be close to production configuration. It means that it is better to use IIS during development process, so you can test all scenarions, such as using Integrated or Classic application pool pipe line mode, 32 or 64 bit compatibility, security and many other things.
If you want to switch from "Visual Studio Development Server" to Microsoft Internet Information Server you should change project web properties as shown below:


It will ask you to confirm to create Application at IIS and it is pretty it, but ...... when you run project again you can find that "Microsoft WCF test client" starts show error:


here is sample an error, which you can get:

Error: Cannot import wsdl:portTypeDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporterError: Schema with target namespace 'http://tempuri.org/' could not be found.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IService1']Error: Cannot import wsdl:bindingDetail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IService1']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IService1']Error: Cannot import wsdl:portDetail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IService1']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='Service1']/wsdl:port[@name='BasicHttpBinding_IService1']Warning: No code was generated.If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or servicesor because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.

The obvious question is why????? and the answer is Application pool permissions on temporary folder. In may case it is "c:\windows\temp".

Here are possible solutions:

1) If you have IIS version older than 7.5 just check application pool identity user and grant him full access to c:\windows\temp folder or simply switch app pool credentials to the user, which has full access to that folder. On a production it is usually should be resolved by first method.

2) If you have IIS 7.5, like in my case, the solution is a little bit tricky. Fist of all you will find that default application pool user identity is set to "ApplicationPoolIdentity" (in older iis versions default identity user was "network service").


Microsoft brought new security model to IIS, so you have to handle it in your solutions.
You can find more details about it in Microsoft article:
http://technet.microsoft.com/en-us/library/dd548356(WS.10).aspx
Virtual accounts - it is how they call it. It is the process to isolate physical account permissions from app pool permissions. It is make sense because IIS worker processes can run third-party code , such as Classic ASP, ASP.NET, PHP code ...., it was time to isolate IIS worker processes from other Windows system services and run IIS worker processes under unique identities.

Like in previous solution, you should grant access application pool access to windows temporary folder. You can do it by 2 ways:
2a) grant permissions directly to c:\windows\temp folder
right click on folder and select properties in popup menu. select security tab and click continue:



And here is a trick. If you application pool is set with "ApplicationPoolIdentity" you will not be able to find such user in list of local users. Instead of that you should use following user pattern:
IIS APPPOOL\<Application Pool Name>

for example: if application name is "MyTestAppPool", the user name should be
IIS APPPOOL\MyTestAppPool

a little bit unusual - isnt it?
You should select location as your local computer as shown below:


 in my case I used application pool with name "DefaultAppPool", so I selected "IIS APPPOOL\DefaultAppPool" and clicked "check names"

in the result you should see validated user:


these steps will resolve problems with application pool permissions.

2b) Add app pool identity user to local Administrators group.
Use this method for development purpose only, but not at production.
Just open computer management, select administrators group and add user by the same rule as described above.
Control panel->Administrative Tools->Computer Management.

select "Administrators" group,  right mouse click and select "Add to Group" menu option from popup menu as shown below:



all next steps in user select should be the same as described in 2a) step.

P.S.
Applying 1, 2a) or 2b) steps will fix an issue with adding reference in Visual Studio Project to wcf service (hosted by IIS 7.5) or by running "Microsoft WCF test client".

My current computer configuaration is:
Operation system: Windows 7 professional (32 bit)
Internet Information Server version: 7.5
Application Pool Pipeline mode: Integrated
Application pool account: ApplicationPoolIdentity

this arcicle can be also applicable to Windows 2008 R2 server.

Tuesday 7 June 2011

Creative Washroom Advertising

I saw many pictures in a past with crazy idea to have TV in a washroom like this:


I visited one of the bars in 2005 with coworkers at Toronto downtown and saw installed monitors in a washroom.
I didn't make picture at that time but it was looking like this:


:-)
The difference between what above and what I saw was TV, showing girls, which were watching at you while you ....
I visited the same bar again, but they took out all those monitors.
At that point of time I thought that it would be good idea to advertise products right in toilets.
I found that it is already implemented by some companies:




I also made this video by visiting Toronto Bars:
"Installed TVs in a washroom - ads are everywhere"




Here is another funny design, but I'm curious are those female or man lips?


This is disgusting but funny:

Friday 3 June 2011

Super coffee machine - How much do we drink coffee and tea?

There is a coffee machine in our office at a kitchen area at work.

It makes very good coffee, tea and hot chocolate. You just need take one of these bags, select program and it is it.


From time to time you have to empty up container with used bags by opening front cover.
When you open front cover display shows how many cups this device served up.
The value amazed me - it was 88337


Good number of served cups - Isn't it?
Small calculations: one cup of coffee/tea is about 200ml, so this coffee machine processed
about 17667 liters!!!!
To move such amount of water we would need following truck, which can load up to 20000 liters of water.


Good coffee machine!!!!
Ok. I checked counter on next day and here is a value: 88520
I started check counter every day at 6pm during one week to confirm it. Here is a small statistic for the week from Monday to Friday:


Our office consumes ~200 cups of tea/coffee and hot chocolate.

P.S.
Stupid statistics - Isn't it :-)

Wednesday 1 June 2011

3D MAX Autodesk 2012 - I am back from 3D Studio 4 to the future!!!

I wish to say "I am returning to 3D Graphics!!!", but my returning will be hard.
  
Pre-history:
_____________
I was born in small city "Ust-Ilimsk" in Russia. When I was at grade 8 in a school, all software,
which we could get, was written on CD disks and delivered to us by magic channels.
We had chance to try different software, including Operation systems,
Different programming languages and graphics software!!!!
I remember how in our hands we got 3D Studio 4 - it was first product, which we started work on.
We didn't have any books and we had to investigate product on our own.
Every weekend we met together with our friends to discuss what new features and tricks we found.

I remember couple valuable projects I made at that time:
1) Image for the local discussion board "Slonopotam". After all these years I found one but it si in bad resolution:


The idea was to use on of the "star wars" character and give him weird name. On a picture displayed russian spelling of "Slonopotam" and its character.

2) Another my project was advertment video for the "Grafika-sm" company.  My friend Oleg owned that company and he asked me assist him in creating good TV adverstmenmt for his company.
That company still exists and making different kind of stamps. I only remember that rendering process took 4 full days!!!!  We (me and my friend) used 3 computers to rendered TGA files on each computer. After that we used Video post to combine them to video and apply music and text.
(I am still trying find that video on my hard disks and will put it to YouTube if I find it. It was very impressive video at that time)

3) <n> years later I made another small project in 3D Max for software company, which I was working for. That video was showed at local TV. I had to render project twice, because their super duper machine for video processing didn't accept resolution of the Secam format, so second time I used PAL.
All these projects I made fo free. At that point of time it was just a hobby. I used Maya as well for static image rendering - very impressive product, but I wanted to make video and I decided to use 3D Max.

Start:
____________
In First step, I downloaded trial version of 3D Studio Max 2012 Architect edition. I installed it in stand-alone mode and started from basics. I was impressed what I found. The basics were the same as n years ago, but it became so easy to work with projects.

Modelling
Object creation was the same as before -
Standard Primitives objects, Compounds objects (I liked use boolean operation), shapes.
I found some new architect edition object types, such as windows, doors... but I would create it easily in standard edition as well.

I had to spend some time on object modifiers and read manual about what every modifier does.
The huge difference was to use real world coordinates in map size. There is "customize->Unit Setup" menu option, which allows set default unit measute for the objects.

Materials:
My weak part was always work with material library. I found "Autodesk material library", which impressed me. All materials, which exists in this version we would  have to create manually. I simplifies work n times.
In old days if I need create material I would take my photo camera and go make pictures or
use very slow internet to download images or buy material library (Last option was not acceptable for me).
Lights
The knowledges was the same as before, but I found Photometric type of lights and "Sky" type of light, which makes day light.

Making animation
Oops - I better leave it for future investigation :-)
Cameras:
The same experience as before- I am happy,

Helpers and space warps
the same as an animation. I will start investigate it for the making videos.

Rendering: Now you can easily select rendering engine in your project.
Some rendering engines, such as V-Ray use they own objects, so it is better decide what you are going to use from the beginning. following renderers are available in this product:
  • mental ray renderer
  • default scanline renderer
  • iray renderer
  • Quicksilver Hardware Renderer
  • VUE File Renderer

I remember those days then "Mental ray" was a separate product and now it is part of 3DMAX!!!

Finally,
I can say that new product very impressed me - It is very simple to use it and I was getting pleasure to work with it on very powerful computer. It will take some time, in any way, to learn new features, which Autodesk brought to this product.
Here is my first rendering after <n> years:



I worked on http://www.sympatico.ca/  - that is why I made it. Of course,  not a professional 3D work (I would say it sucks), but good for the beginner. I played with text object  + glass material + photometric lights.

Here is another one:


In this project I played with muli/sub-object material + lights + real-World mapping coordinates. I used inches in environment preferences + I created floor, based on material size proportions. I selected tile 3x3 inches/sq.
There is one bug in my rendering - black tile on the floor. I think it is 3DMax bug  - I double checked project material assignment.

As I said, I will start look into new feature of 3DMAX (buy one  - of course) and start make good videos (hopefully).

P.S.
I would like to have friends, who already doing it on professional base to get new knowledges and would like to learn new things based on real tasks and help with real projects and ideas.
I really impressed what other people doing in this product, but most of work I would like to see as video and not as static image. I am understanding that it serious work but I woould share my knowledges about distributed rendering and it's optimization.