Thursday, September 8, 2011

WSS User Info data not in sync with MOSS User Profile

If your WSS User Info data not in sync with MOSS User Profile and you have two or more frontends, please read on...

After trying everything on the books (http://blogs.technet.com/b/nishants/archive/2010/08/23/troubleshooting-user-profile-sync-issues-in-office-sharepoint-server-2007.aspx) I wasnt able to solve it, including with the stsadm commands:


stsadm -o sync -ignoreisactive 1
stsadm -o sync -deleteolddatabases 0
stsadm -o sync


Then, after browsing the ULS I found the following error:



User Profile Import: Error while querying for whether the import is in progress: 
    System.Net.WebException: The underlying connection was closed: 
        An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.


After that it was a question of replacing the SSL Certificates for the Office Server Web Services web site using selfssl from IIS 6.0 Resouces kit and the problem was solved.

Hope you find this information usefull.





    Tuesday, May 10, 2011

    Log Parser

    Just found out about Log Parser 2.2 from Microsoft, and while I was at it, i grabbed Visual Log Parser from CodePlex for a nice GUI (who likes cl right?)

    This is simple app that I found out while trying to understand by IIS was recycling too many times and browsing this post.

    It looks like you can query your EventViewer and a ton of other Log repositories just like a regular SQL database:

    Select top 100 *
    from \\server\System where SourceName = 'W3SVC'
    and EventID in (1009;1010;1011;1074;1077;1078;1079;1080;1117)
    order by timegenerated desc

    Better than scrolling up and down right? You can even build up some VBS or something else to have some real time data from your logging. And this will work for different log platforms.


    Remote Log4Net

    You probably know this already, or this might not come as a surprise but enabling log4net to log to a remote place is really simple.

    We had a scenario of only one front end with custom systems using log4net, but we needed to add a second front end, and with that the question about what to do about logging.

    I wasn't aware how simple is to enable remote logging on log4net. So, heads up if you were like me:

    Get log4net Remove Logging Service at CodePlex (you can get the source and change at your will), after install this will create a listener service where you want to store your remote log repository.

    Then, at your local clients just change the appender to something like this

    <appender name="remotAppend" type="log4net.Appender.RemotingAppender" >
    <sink value="tcp://remoteserver:port/Log4netRemotingServerService" />
    <lossy value="false" />
    <bufferSize value="10" />
    <onlyFixPartialEventData value="true" />
    </appender>

    At your Remote repository use your favorite appender, RollingLogFileAppender or whatever.
    Remember to add the hostname property to your layout type: (%-10property{log4net:HostName}).

    Something like this:

    <appender name="RollLogAppender" type="log4net.Appender.RollingFileAppender">
    <file value="C:\LOGS\MYAPP.log.txt" />
    <appendToFile value="true" />
    <rollingStyle value="Date" />
    <encoding value="UTF-8" />
    <datePattern value="'.'yyyy'.'MM'.'dd'.'HH'.log.txt'" />
    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
    <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date (%-10property{log4net:HostName}) [%thread] %-5level %logger - %message%newline" />
    </layout>
    </appender>

    Maybe you could do without this Codeplex service, but since it was so simple and the component is working fine I didnt waste any time looking for alternatives.

    If you dont agree, please comment, shed some light :) Thank you.