fredag 20 december 2013

Example on simple menu in html

<!DOCTYPE HTML>
<html>
<head>
<title>menuExample</title>

<style>
.ulNav a {
   text-decoration: none;
   color: black;
   font-size: 11px;
}  
.ulNav a:hover {
   color: whitesmoke;
   background-color: #777777;
}        
.ulNav {
   margin-left: 1px;
   float: left;
}  
.ulNav li
{
   list-style: none;
   margin-right: 0.1em;
   padding: 0 0 0 0;
}  
.ulNav li:hover ul {
   display: block;
   background-color: whitesmoke;
   border: 1px solid black;
}
.ulNav li {
   float: left;
   padding: 0 0.6em;
}    
.ulNav li a, a:hover {
   text-decoration: none;
}  
.ulNav li li {
  float: none;
  margin-left: -44px;
  margin-top: 2px;
}
.ulNavLevel2 {
  display: none;
  position: absolute;  
}
</style>

</head>
<body>
 
   <ul class="ulNav">
     <li>
      <a href="#">Order</a>
      <ul class="ulNavLevel2">
        <li><a href="../Row1.aspx">Row1</a></li>
        <li><a href="../Row2.aspx">Row2</a></li>
        <li><a href="../Row3.aspx">Row3</a></li>
      </ul>
    </li>    
   
    <li>
      <a href="../Customer.aspx">Customer</a>
    </li>
  </ul>


</body>
</html>

tisdag 10 september 2013

System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Problem:
System.Security.SecurityException:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.FileSystemInfo.get_FullName()
at OfficeOpenXml.ExcelPackage.Save()
at OfficeOpenXml.ExcelPackage.SaveAs(FileInfo file)
at ExcelOnTheWebBusiness.CreateExcelFile.ExcelFile.SaveAsExcelFile(DataTable result, DataTable fileNameinExcelFile, DataTable filter, String fileName, String sheetName, Boolean includeFreezePane, Boolean compressFile, ExcelPropertiesData excelPropertiesData)
in C:\Projects\SEGOT-VLCApplications\ExcelOnTheWeb\Development\ExcelOnTheWebBusiness\CreateExcelFile\CreateExcelFile.cs:line 567
at ExcelOnTheWebBusiness.CreateExcelFile.ExcelFile.Create(CreateExcelInputData createExcelInputData, ExcelPropertiesData excelPropertiesData)
in C:\Projects\SEGOT-VLCApplications\ExcelOnTheWeb\Development\ExcelOnTheWebBusiness\CreateExcelFile\CreateExcelFile.cs:line 140

The action that failed was:
Demand

The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission

The first permission that failed was:
The demand was for:
The granted set of the failing assembly was:
The assembly or AppDomain that failed was:
EPPlus, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1

The method that caused the failure was:
Void Save()

The Zone of the assembly that failed was:
Internet

The Url of the assembly that failed was:
file:///D:/APPS/eow.gto.volvo.net/WebRoot/bin/EPPlus.DLL


Was solved by:Click on button Unblock on the properties window for the file in question:









söndag 11 augusti 2013

Please have a look at my new application, Sök en Site (Search A Site):  http://www.sokensite.netne.net

Also this application is written in Swedish.

It is also written in PHP which is completly new for me!

måndag 5 augusti 2013

An error has occurred for task xxx. Error Message: The following error was reported: 2147943785


Got the following error:



Corrected by:

Start->Administrative Tools -> Local Security Policy
Select Local Policies -> User Rights Assignment
Double click on Log on as a batch job
Click on button Add User or Group...
Enter user id


tisdag 9 juli 2013

Miss the Directory Browser Icon in IIS7 (Windows 2008 R2)

The Direcory Browser Icon was missing on a new Windows 2008 R2 Server:



This was fixed via:
Server Manager - > Select Roles -> Web Server (IIS)
Scroll down to Role Services
Click:  Add Role Services
Check Directory Browsing under Common HTTP Features


tisdag 7 maj 2013

MyBenefitsWiki

Please have a look at my new application, MyBenefitsWiki: https://sites.google.com/site/mybeniftswiki/
It is written in Swedish.

tisdag 29 januari 2013

Visual Studio extremely slow

I had problem with one application that was extremely slow, when working in Visual Studio (2008).
It was in such a state that I had to upgrade my hardware (new much faster PC) to be able to work at all. And even in this new environment it was painfully slow. While working in all other applications worked very smoothly.

At last I found the reason:
The application have two projects that contains the "business logic".

In both projects there was references set up to several COM-components (used to communicate with a mainframe system). Where in one of those projects these components never had been used.

In a major change in the application most of these COM-components was replaced by another solution, and they was removed from the system.
But: the references was only removed from the project where they had been used. In the other project, where they never had been used, they where not removed.

And it was due to this that the performence when working in VS2008 was a disaster. After removing the references it worked ok.

onsdag 16 januari 2013

asp.net datakey does not work sometimes

Had problems reading data from DataKeys in my GridView, for example:

GridViewDistributionHoldRVI.DataKeys[GridViewDistributionHoldRVI.EditIndex][
"DistributionOrderId"].ToString();Returned null.


The problem araised after a time, when developing this function.
The problem was cauesed by that somtimes the value for a Key before the one I tried to read had a value of null, the the values after this could also not be read.

In my example DORInstanceId was null:

DataKeyNames
="DORInstanceId,DistributionOrderId,MainType,ChassisNo,BusinessAreaCode,DistributionPriority,VehicleIdNo,StockCode,BlockCode,HoldDate"

Initiating this value to blank solved this problem.