Tuesday, September 24, 2013

Error Type: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

I got the following error when i was running my asp.net application.


Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

solution is 

start --> Run -->
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -iru


Tuesday, September 10, 2013

Microsoft outlook attachment remainder..

Outlook Attachment Reminder

This Outlook macro will politely remind you to attach a file if it finds the word "attach" in your email and no actual attached file.
Adding a macro to Outlook is easy. Just copy everything below starting with "Private Sub" through "End Sub." In Outlook, select the "Tools | Macro | Visual Basic Editor" menu option. You may need to expand the project by clicking the plus signs under Project1 until you see ThisOutlookSession, and double-click it. Click into the big white empty page and hit Paste.

Click Save and you'll be all set. If you've previously disabled macros you'll need to enable them.
*Note: Outlook Express doesn't support macros.
*Update: Outlook counts files used in Signatures as attachments. If your signature uses one or more files, find the line intStandardAttachCount = 0 and make it equal the number of files in your signature.

Copy and Paste this:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)Dim m As Variant
Dim strBody As String
Dim intIn As Long
Dim intAttachCount As Integer, intStandardAttachCount As Integer
On Error GoTo handleError
'Edit the following line if you have a signature on your email that includes images or other files. Make intStandardAttachCount equal the number of files in your signature.
intStandardAttachCount = 0
strBody = LCase(Item.Body)
intIn = InStr(1, strBody, "original message")
If intIn = 0 Then intIn = Len(strBody)
intIn = InStr(1, Left(strBody, intIn), "attach")
intAttachCount = Item.Attachments.Count
If intIn > 0 And intAttachCount <= intStandardAttachCount Then
 
    m = MsgBox("It appears that you mean to send an attachment," & vbCrLf & "but there is no attachment to this message." & vbCrLf & vbCrLf & "Do you still want to send?", vbQuestion + vbYesNo + vbMsgBoxSetForeground)
    If m = vbNo Then Cancel = True
 
End If
handleError:
If Err.Number <> 0 Then
    MsgBox "Outlook Attachment Reminder Error: " & Err.Description, vbExclamation, "Outlook Attachment Reminder Error"
End If
End Sub


VBEditor looks like this:


Error Type: system.deployment.application.deploymentdownloadexception unknown subtype in clickonce application.

Recently i have worked with .NET ClickOnce application, in that we published the application and deployed on IIS6.0, every thing working well in IIS6.0. But client changed server and now IIS is 7.5 ,after placing files on IIS7.5 we are unable to download .sdf file from bin folder.

we are getting the following error
ERROR DETAILS
Following errors were detected during this operation.
* [9/10/2013 1:56:27 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://xxx/Application Files/versionnumber/bin/Debug/yyy_ce.sdf.deploy did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- The remote server returned an error: (404) Not Found.
- Source: System
- Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)


I have tried to solve this problem almost a day but i couldn't.
IIS7.5 is wouldn't allow to view or access file from bin folder.
Hidden Segments used to specifies that certain segments of URLs can be made inaccessible to clients.
So, Finally i just removed bin folder from Hidden Segments in Request Filtering setting from that website on IIS7.5.


After removing that folder from hidden segments, application is able to download .sdf file from server.


and