Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

laserbaronen

@laserbaronen
About
Posts
52
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CredentialCache.DefaultCredentials always empty?
    L laserbaronen

    Yes, network credential. Like this:

    service.ClientCredentials.Windows.ClientCredential = (NetworkCredential)System.Net.CredentialCache.DefaultCredentials;

    but DefaultCredentials are null even though i have the following settings in web.config:

    <authentication mode="Windows" />
    <!-- Windows is used, Kerberos is configured as authprovider in sharepoint -->
    <identity impersonate="true" />
    <!-- Sharepoint is setting impersonate=true as default... -->
    <authorization>
    <deny users="?" />
    <!-- Force authentication by denying anonymous users. Default: allow users="*" -->
    </authorization>


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    ASP.NET csharp wcf question

  • CredentialCache.DefaultCredentials always empty?
    L laserbaronen

    Hi! I'm trying to set the clientcredentials of a wcf-proxy to CredentialCache.DefaultCredentials, but it seems to be empty for some mysterious reason. I have the following code in my web.config:

    Any ideas why DefaultCredentials is empty?


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    ASP.NET csharp wcf question

  • popup from codebehind?
    L laserbaronen

    I have written a component that uploads a file to the user using Response.Header functionality. The problem is that after doing this, the response is ended = page wont handle more postbacks.. Need to set some predefined variables before it will work, so i thought maybe i could set the values and then perform a popup to the page that generates the download. Like clicking an href with target=_blank Is it possible to do this from codebehind? (buttonclick)


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    ASP.NET help question

  • WCF + multiref
    L laserbaronen

    I need to be able to handle multirefs in soapmessages coming into my wcf client. If this is possible, how?


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    WCF and WF csharp wcf question

  • WCF client access layer best practice
    L laserbaronen

    I have created an access layer for my application. I created a subclass of the generic ChannelFactory class to be able to separate the WCF configuration from the main application. Just wondering, is this the usual way to go about it, or is it pherhaps considered a best practice? If not, what is?


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    WCF and WF question csharp wcf discussion workspace

  • access rights for windows services
    L laserbaronen

    I need to set access rights for a domain user to start and stop services, but i can't find any good info on how to do this! Any suggestions? Reference: [^]


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    System Admin com tutorial question

  • ServiceController remote access, impersonation
    L laserbaronen

    I am trying to control a service remotely, by impersonating (basically using this technique: http://www.codeproject.com/KB/dotnet/UserImpersonationInNET.aspx[^]) an administrator of the remote computer and using the ServiceController classes. The problem is that i can't start or stop the services, I can however enumerate them fine. If i add my local account as an administrator on the remote computer, and turn off impersonation I can start and stop. Any idea why? Does impersonation not do the job? plz halp


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# csharp com help question career

  • Inheritance and constructors
    L laserbaronen

    class classB : classA
    {
    public classB() : this(5)
    {
    //some code
    }
    public classB(int i) : base("laser")
    {
    //some code
    }
    }

    calling classB() will run both


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# question oop help

  • Authorization roles & IIS
    L laserbaronen

    There is only one, and it is in the root directory


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    ASP.NET windows-admin security help question

  • Authorization roles & IIS
    L laserbaronen

    I have created a virtual directory in IIS for my application. The problem is that it completely disregards the authorization settings in the web.config:

    <location path="Admin">
    <system.web>
    <authorization>
    <allow users="domain\Administrator" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    If i run the application as a web site, it works perfectly.. Any ideas of why this can be? As far as I can see, the settings are the same


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    ASP.NET windows-admin security help question

  • Modulus function
    L laserbaronen

    % 10%2


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# csharp tutorial

  • distinct?
    L laserbaronen

    I think i solved it! :D

    ALTER proc [dbo].[GetAverageProcessingTime](@startDate datetime, @endDate datetime)
    as
    begin
    DECLARE @InterchangeIds TABLE
    (
    InterchangeId uniqueIdentifier
    )

    insert into @InterchangeIds (InterchangeId)
    select distinct m.InterchangeId from Messages m where WrittenDate between @startDate and @endDate

    select avg(dbo.GetProcessingTime(InterchangeId)) from @InterchangeIds
    end

    thanks


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    Database database help question learning

  • distinct?
    L laserbaronen

    I have a table called Messages, where many messages can share the same InterchangeId I also have a function to get the processing time for an interchange, it looks like this:

    ALTER function [dbo].[GetProcessingTime] ( @interchangeId uniqueidentifier )
    returns int
    AS
    BEGIN
    DECLARE @recDate DateTime
    DECLARE @sendDate DateTime
    DECLARE @return int

    -- Get receivetime
    select top 1 @recDate = mf.[Event/Timestamp] from dbo.Ports p INNER JOIN
    BizTalkDTADb.dbo.dtav_MessageFacts mf
    INNER JOIN
    dbo.Messages m ON mf.[MessageInstance/InstanceID] = m.MessageId ON
    p.Name = mf.[Event/Port] INNER JOIN
    dbo.PortTypes pt ON p.FK_PortType = pt.Id
    WHERE pt.Description='ReceivePort' and m.[InterchangeId] = @interchangeId
    order by mf.[Event/Timestamp] asc --first

    select top 1 @sendDate = mf.[Event/Timestamp] from dbo.Ports p INNER JOIN
    BizTalkDTADb.dbo.dtav_MessageFacts mf
    INNER JOIN
    dbo.Messages m ON mf.[MessageInstance/InstanceID] = m.MessageId ON
    p.Name = mf.[Event/Port] INNER JOIN
    dbo.PortTypes pt ON p.FK_PortType = pt.Id
    WHERE pt.Description='SendPort' and m.[InterchangeId] = @interchangeId
    order by mf.[Event/Timestamp] desc -- latest

    set @return = DATEDIFF(millisecond ,@recDate,@sendDate)
    return @return
    END

    It gets the time difference between the first and the last message in the interchange in milliseconds. Now what i want to do is: get the average processing time for each unique interchange hence:

    ALTER proc [dbo].[GetAverageProcessingTime](@startDate datetime, @endDate datetime)
    as
    select avg(distinct dbo.GetProcessingTime(InterchangeId)) from Messages where WrittenDate between @startDate and @endDate

    am confused about the distinct in the last procedure, it feels.. wrong :)


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    Database database help question learning

  • distinct?
    L laserbaronen

    Hm yeah but that selects the avg(.. only once? and avg(distinct functioncall(... gets the result of the functioncall distinct(what if it is the same for two different Ids?) if I understand it correctly :confused:


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    Database database help question learning

  • distinct?
    L laserbaronen

    Hey! Im an sql beginner and i have got a small problem with a query:

    select avg(dbo.GetProcessingTime(InterchangeId)) from Messages

    i want to call the function only once per InterchangeId like

    select distinct InterchangeId from Messages -- Run the avg(Function(...)) on this result only

    Any suggestions?


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    Database database help question learning

  • New Methods for existing types?
    L laserbaronen

    hmm o_o

    public static class ExtMethods
    {
    public static string RemoveFirst(this string str)
    {
    return str.Remove(0,1);
    }
    }
    class ExtMethodDemo
    {
    static void Main(string[] args)
    {
    string r1 = "12345".RemoveFirst();
    Console.WriteLine(r1);
    Console.ReadLine();
    }
    }

    was thinking something like this


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    modified on Tuesday, May 20, 2008 10:05 AM

    C# question

  • New Methods for existing types?
    L laserbaronen

    http://www.codeproject.com/KB/cs/Using_Extension_Methods.aspx[^]


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# question

  • New Methods for existing types?
    L laserbaronen

    check out extension methods


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# question

  • C# code to triple a number
    L laserbaronen

    hey, that aint not no signature :confused::confused::confused:


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# csharp mcp

  • C# code to triple a number
    L laserbaronen

    hey, looks like my signature o.o


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    C# csharp mcp
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups